Skip to content

Instantly share code, notes, and snippets.

@johnsolk
Created August 29, 2016 03:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save johnsolk/0f96ba253ecb0859037e2ec1acb88fdf to your computer and use it in GitHub Desktop.
Save johnsolk/0f96ba253ecb0859037e2ec1acb88fdf 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/
@bcrafton
Copy link

This worked for me as well.

@thangadurairamajayam
Copy link

git clone https://github.com/thangadurairamajayam/gum.git
Initialized empty Git repository in /root/gum/.git/
error: while accessing https://github.com/thangadurairamajayam/gum.git/info/refs

fatal: HTTP request failed

how to fix this error?? kindly help

@iashu1
Copy link

iashu1 commented Apr 25, 2018

fatal: HTTP request failed
[root@localhost Docker]# git remote set-url origin https://github.com/iashu1/ECSTest.git
[root@localhost Docker]# git push -u origin master
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/iashu1/ECSTest.git/info/refs

how to fix....
it's urgent.

@simplicii
Copy link

I had the same issue and could solve it with adding the user for the connection:
i.e git remote set-url origin https://YOURUSERNAME@github.com/iashu1/ECSTest.git

@NICK-DUAN
Copy link

Initialized empty Git repository in /home/ops/vim-install/vim-deprecated/.git/
error: while accessing https://github.com/ma6174/vim-deprecated.git/info/refs

fatal: HTTP request failed

how about this problem? i don't have a errno, it just show "fatal:HTTP request failed". I have tried those mothods , but it can't work.

@anandha1991
Copy link

anandha1991 commented Jan 9, 2019

anand@DESKTOP-CJT6ER2 MINGW64 ~/Desktop/Jenkins_Git/AWS (master)
$ git push --set-upstream origin master
remote: Permission to anandha1991/AWS.git denied to nephosuser.
fatal: unable to access 'https://github.com/anandha1991/AWS.git/': The requested URL returned error: 403

Need some help here!..

I'm trying git push but it's failing for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment