gpt4 book ai didi

git - 为什么 git ://works but git@ does not

转载 作者:IT王子 更新时间:2023-10-29 00:53:02 31 4
gpt4 key购买 nike

为什么 git://有效

$ git clone git://github.com/schacon/grit.git
Cloning into 'grit'...
...
Checking connectivity... done.

但是 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.

感谢任何帮助

最佳答案

这是因为 git@ 使用了 ssh 协议(protocol)。它等同于 ssh://git@.. 因此,如果您没有正确的 ssh key ,它将无法工作。选项 git://但是使用类似于 ssh 的 git 协议(protocol),但根本不使用身份验证。参见 chapter on protocols获取更多信息。

关于git - 为什么 git ://works but git@ does not,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21532367/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com