GitBash 一直提示我输入 GitHub 的用户名和密码
GitBash keeps prompting me for username and password for GitHub
我已经使用 gitbash 与 github 一起工作了一段时间,但每次我推或拉时我都必须输入我的 github 用户名和密码在新提示中。
我尝试使用 ssh:// 而不是 https:// 克隆 github 代表,但是当我这样输入时:
git clone ssh://github.com/user/repo.git 我得到以下信息:
$ git clone ssh://github.com/user/repo.git
Cloning into 'repo'...
The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
请确保您拥有正确的访问权限
并且存储库存在。
您正在尝试使用 HTTPS 而不是 ssh 进行克隆。
SSH link 会像这样
git@github.com:domain/repositoryName.git
您可以通过单击克隆或下载选项卡来查找 ssh link,您会在那里找到使用 ssh 的选项。
我已经使用 gitbash 与 github 一起工作了一段时间,但每次我推或拉时我都必须输入我的 github 用户名和密码在新提示中。
我尝试使用 ssh:// 而不是 https:// 克隆 github 代表,但是当我这样输入时:
git clone ssh://github.com/user/repo.git 我得到以下信息:
$ git clone ssh://github.com/user/repo.git
Cloning into 'repo'...
The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
请确保您拥有正确的访问权限 并且存储库存在。
您正在尝试使用 HTTPS 而不是 ssh 进行克隆。
SSH link 会像这样
git@github.com:domain/repositoryName.git
您可以通过单击克隆或下载选项卡来查找 ssh link,您会在那里找到使用 ssh 的选项。