Git push fatal: unable to connect to github.com

Source: Internet
Author: User

After modifying or adding the file, run git push to push it to the remote repository after git commit. The first problem occurs:

Solution reference: Solve the fatal: unable to connect to github.com Problem

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

Then there are two consecutive push problems:

Solution reference: Pushing to Git returning Error Code 403 fatal: HTTP request failed (see Appendix 1)

GitHub only supports reading and writing remote repositories through ssh. Therefore, configure the. git/config file of the current local repository or use the following command:

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

Then push again successfully:

Appendix 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 shoshould be:

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

GitHub details: click here
GitHub: click here

Recommended reading:

How to create an organization on GitHub

Usage in GitHub Linux

How to build a GitHub development environment using Eclipse in Windows

Source code for R language 3.0.1 has been submitted to GitHub

Import Maven project to Eclipse4.2 from GitHub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.