Skip to content

Instantly share code, notes, and snippets.

@Abhishek9634
Forked from johnsolk/git_error_solution.md
Created April 16, 2018 07:21
Show Gist options
  • Save Abhishek9634/9353b5d77ed526843ab162992a6e46fe to your computer and use it in GitHub Desktop.
Save Abhishek9634/9353b5d77ed526843ab162992a6e46fe to your computer and use it in GitHub Desktop.
git error, fatal: HTTP request failed

Got this error message:


[ljcohen@dev-intel16 Porites_astreoites_larvae_salinity]$ git push origin master
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/ljcohen/Porites_astreoites_larvae_salinity.git/info/refs

fatal: HTTP request failed

Googled problem and found this: http://stackoverflow.com/questions/25931684/git-push-error-could-not-resolve-host-name

Tried this, but did not work:

remote set-url origin ssh://git@github.com:ljcohen/Porites_astreoites_larvae_salinity.git

Then this worked:

remote set-url origin https://ljcohen@github.com/ljcohen/Porites_astreoites_larvae_salinity/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment