gpt4 book ai didi

git - 在 GitHub 上使用 HTTPS 或 SSH

转载 作者:太空狗 更新时间:2023-10-29 12:49:51 25 4
gpt4 key购买 nike

我想知道在 HTTPS 和 SSH 之间连接到 GitHub 存储库的最佳方式是什么。显然 GitHub 似乎推荐 HTTPS 而不是 SSH:

If you have decided not to use the recommended HTTPS method, we can use SSH keys to establish a secure connection between your computer and GitHub. The steps below will walk you through generating an SSH key and then adding the public key to your GitHub account.

但我看不出 HTTPS 实际上比 SSH 更好的原因。 SSH 通常应该比 HTTPS 更安全。那么为什么 GitHub 会推荐 HTTPS?

最佳答案

我从 GitHub 上得到了答案:

We recommend https since it is far simpler to set up and doesn't require knowledge or secure management of ssh keys.

Since ssh and https both use ssl behind the scenes, the benefit of requiring access to a private key rather than login credentials only holds if those keys are managed securely. For those unfamiliar with best practices around ssh keys, this is often harder to explain than it is to let them maintain username/passhprase login credentials using the procedures they already know. The recommendations are there so those who don't have a strong opinion either way can choose the most straightforward method. Anyone who prefers ssh keys is able to do so as they're fully supported.

关于git - 在 GitHub 上使用 HTTPS 或 SSH,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18520061/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com