为什么git://有效
$ git clone git://github.com/schacon/grit.git
Cloning into 'grit'...
...
Checking connectivity... done.
Run Code Online (Sandbox Code Playgroud)
但是git @没有
$ git clone git@github.com:schacon/grit.git mygrit
Cloning into 'mygrit'...
Warning: Permanently added the RSA host key for IP address '192.30.252.129' to t
he list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏
第一个克隆方法是使用 git 协议,第二个是使用 SSH。
您可能没有在 github.com 上设置 SSH 令牌
https://help.github.com/articles/generate-ssh-keys
为您提供有关如何设置用户帐户以供 SSH 使用的步骤。
您可以在此处查看与 github 相关的协议之间的差异:
https://gist.github.com/grawity/4392747
归档时间: |
|
查看次数: |
9274 次 |
最近记录: |