为什么git://有效,但git @没有

 hola'thrme 发布于 2023-01-29 16:52

为什么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.

任何帮助表示赞赏

1 个回答
  • 这是因为git @使用ssh协议.它相当于ssh:// git @ ..所以如果你没有正确的ssh密钥它将无法工作.选项git://然而使用git协议,它类似于ssh但根本不使用任何身份验证.有关更多信息,请参阅协议章节.

    2023-01-29 16:54 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有