admin管理员组文章数量:1026989
我们在使用git clone项目时候经常会 clone失败
fatal: unable to access 'https://github/xxxx/xxxx.git': Failed to connect to 127.0.0.1 port 8087: Connection refused
或是 fatal: unable to access 'https://github/zhayujie/chatgpt-on-wechat.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
解决办法:
通过ssh连接GitHub
1. Linux安装ssh
sudo apt-get install ssh
ssh-keygen 会确认密钥的存储位置和文件名(默认是 .ssh/id_rsa),然后全部回车即可。
2. 创建秘钥文件
ssh-keygen -t rsa -C "你的github账号邮箱"
再点击三次回车键
3.将公钥添加到GitHub账户
(1)将id_rsa.pub文件内容全部复制;
(2)登陆到GitHub上,右上角小头像->Setting->SSH and GPG keys中,点击new SSH key。
4. ssh测试
ssh -T git@github
结果为:,表示配置成功。
5.重新git clone
我们在使用git clone项目时候经常会 clone失败
fatal: unable to access 'https://github/xxxx/xxxx.git': Failed to connect to 127.0.0.1 port 8087: Connection refused
或是 fatal: unable to access 'https://github/zhayujie/chatgpt-on-wechat.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
解决办法:
通过ssh连接GitHub
1. Linux安装ssh
sudo apt-get install ssh
ssh-keygen 会确认密钥的存储位置和文件名(默认是 .ssh/id_rsa),然后全部回车即可。
2. 创建秘钥文件
ssh-keygen -t rsa -C "你的github账号邮箱"
再点击三次回车键
3.将公钥添加到GitHub账户
(1)将id_rsa.pub文件内容全部复制;
(2)登陆到GitHub上,右上角小头像->Setting->SSH and GPG keys中,点击new SSH key。
4. ssh测试
ssh -T git@github
结果为:,表示配置成功。
5.重新git clone
版权声明:本文标题:通过ssh连接GitHub 解决git clone失败 unable to access ‘https:github.com‘ 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/jiaocheng/1740418116a1763756.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论