感谢支持
我们一直在努力

git push fatal: unable to connect to github.com问题

当修改或者添加完文件,git commit之后运行git push推送到远程仓库,第一次遇到问题:

git push fatal: unable to connect to github.com问题

解决方案参考:解决fatal: unable to connect to github.com问题 http://www.linuxidc.com/Linux/2014-03/98667.htm

$ git config –global url.”https://”.insteadOF git://

然后连续两次次推送遇到问题:

git push fatal: unable to connect to github.com问题

解决方案参考: Pushing to Git returning Error Code 403 fatal: HTTP request failed (见附1)

GitHub似乎只支持ssh方式的读写远程仓库。因此配置当前本地仓库的 .git/config  文件,或者使用命令:

$ git remote set-url origin ssh://git@github.com/RanHuang/contiki.git

然后再次推送成功:

git push fatal: unable to connect to github.com问题

附1

Pushing to Git returning Error Code 403 fatal: HTTP request failed

Github seems only supports ssh way to read&write the repo, although https way also displayed ‘Read&Write’.
So you need to change your repo config on your PC to ssh way:

nstead of editing .git/config file manually, you can use git remote set-url command.
In your case it should be:

git remote set-url origin ssh://git@github.com/derekerdmann/lunch_call.git

GitHub 的详细介绍:请点这里
GitHub 的下载地址:请点这里

推荐阅读

如何在 GitHub 建立组织 http://www.linuxidc.com/Linux/2013-08/88197.htm

GitHub Linux下使用方法 http://www.linuxidc.com/Linux/2013-06/86417.htm

Windows下Eclipse搭建GitHub开发环境图文教程 http://www.linuxidc.com/Linux/2013-06/85372.htm

R语言 3.0.1 源码已经提交到 GitHub http://www.linuxidc.com/Linux/2013-05/84425.htm

从GitHub将Maven项目导入Eclipse4.2 http://www.linuxidc.com/Linux/2013-04/83082.htm

赞(0) 打赏
转载请注明出处:服务器评测 » git push fatal: unable to connect to github.com问题
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏