GitHub 为什么要求我输入用户名和密码?

huangapple go评论51阅读模式
英文:

why does github ask me for a username and password?

问题

我已设置了一个SSH密钥,但当我推送时,GitHub仍然要求我输入用户名和密码。

英文:

I have set up an ssh key but github still asks me for a username and password when I push.

答案1

得分: 0

有两种主要方法可以克隆一个Github存储库,SSHHttps

如果您使用Https方法克隆存储库,在添加SSH密钥后,它将要求您输入用户名和密码。

要检查您正在使用哪个版本,您可以运行 "git remote -v"

如果响应中包含带有 "https" 的URL,您需要更新您的源。请按照此链接中提到的步骤进行操作。

英文:

There are primary 2 ways you can clone a Github Repository SSH or Https.

If you have cloned your repository with Https method after adding SSH key it will ask you username and password.

To check which version you are using you can run "git remote -v".

If the resposne is having url with "https". You have to update your origin.
Please follow steps mentioned in this link.

huangapple
  • 本文由 发表于 2023年2月10日 02:56:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/75403221.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定