GitBash不断提示我输入GitHub

时间:2017-02-12 16:50:05

标签: github git-bash

我一直在使用gitbash与github一起工作,但每当我推或拉时,我必须在新提示中输入我的github用户名和密码。

我尝试使用ssh://而不是https://来克隆github rep,但是当我这样打字时:

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.

请确保您拥有正确的访问权限    存储库存在。

1 个答案:

答案 0 :(得分:1)

您正尝试使用HTTPS而不是ssh进行克隆。

SSH链接就像这样

<强> git@github.com:域/ repositoryName.git

您可以通过单击克隆或下载选项卡查找ssh链接,您将找到使用ssh的选项。

相关问题