Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GitBash不断提示我输入GitHub的用户名和密码_Github_Git Bash - Fatal编程技术网

GitBash不断提示我输入GitHub的用户名和密码

GitBash不断提示我输入GitHub的用户名和密码,github,git-bash,Github,Git Bash,我使用gitbash使用github已经有一段时间了,但每次推拉时,我都必须在新的提示符中键入我的github用户名和密码 我尝试使用ssh://而不是https://克隆github rep,但当我这样键入时: git克隆ssh://github.com/user/repo.git 我得到以下信息: $ git clone ssh://github.com/user/repo.git Cloning into 'repo'... The authenticity of host 'github

我使用gitbash使用github已经有一段时间了,但每次推拉时,我都必须在新的提示符中键入我的github用户名和密码

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

git克隆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链接应该是这样的

git@github.com:domain/repositoryName.git


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

谢谢,我以前没有看到过它。我必须在github上添加我的ssh密钥,就这样。现在可以了!