Git SSH交换身份:读取:软件导致连接中止。

3
今天我从https://github.com/bhlx3lyx7/incubator-griffin/tree/master将一个项目fork到了我的GitHub上。当我使用git clone命令时,像这样:git clone git@github.com:ahutsunshine/incubator-griffin.git measure-json,出现了一个大问题。下面的照片显示了这个问题。你有什么建议来解决它吗? enter image description here

enter image description here

enter image description here


你是在使用Windows系统吗?我猜是吧? - danglingpointer
是的,我正在使用Windows。你曾经遇到过这种情况吗? - flynn
2个回答

3
感谢大家。现在我已经解决了这个问题。问题的关键是git url(ssh或https)。
如果您使用带有ssh的克隆,例如git@github.com:apache/incubator-griffin.git,它将会出错。 enter image description here 然而,如果您使用带有https的克隆,例如https://github.com/apache/incubator-griffin.git,it将会成功克隆。

enter image description here

在查阅相关文件后,我发现它们目前推荐使用HTTPS,因为它在最广泛的网络和平台上设置最容易,并且适合于所有新手用户。

  1. HTTPS不太可能被防火墙屏蔽。

    https://help.github.com/articles/which-remote-url-should-i-use/

    enter image description here

  2. HTTPS连接允许credential.helper缓存您的密码。

    https://help.github.com/articles/set-up-git

    enter image description here


0
你面临的问题与git无关,而是SSH身份验证失败。首先,请检查你的环境。
这是本地环境问题。错误明确指出“没有这样的文件或目录”。
找到这个文件“key_load_public”。密钥文件丢失,如果缺少密钥文件,则需要添加密钥文件。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接