git push fatal: unable to connect to github.com問題

來源:互聯網
上載者:User

當修改或者添加完檔案,git commit之後運行git push推送到遠程倉庫,第一次遇到問題:

解決方案參考:解決fatal: unable to connect to github.com問題

$ git config --global url."https://".insteadOF git://

然後連續兩次次推送遇到問題:

解決方案參考: 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

然後再次推送成功:

附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 建立組織

GitHub Linux下使用方法

Windows下Eclipse搭建GitHub開發環境圖文教程

R語言 3.0.1 源碼已經提交到 GitHub

從GitHub將Maven項目匯入Eclipse4.2

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.