error: The requested URL returned error: 403 Forbidden while accessing

I have a git repository . I have a GUI client in Windows and EGit in Eclipse ADT. Generally I edit in Eclipse ADT and use the GUI Client to update the Github repo. First I commit (which creates a buffer) and then when I sync it uploads it to my actual repo.

Now I have clone my repo on Linux(CentOS 6.4). Everything is setup. I changed some file. Then I used git add and git commit -m "message" -a command and it worked fine. But my actual github repo was not updated. After bit of googling I figured out that we have to explicitly provide git push command. After which I am getting

  • Typical .gitignore file for an Android app
  • Implementing ActionBar-PulltoRefresh by Chris Banes, library errors etc
  • justify text in textview not working properly
  • Creating a custom SMS/MMS app in Android - using Eclipse and GitHub - why so many unresolveds?
  • Generating android build with jenkins.Creating .apk files
  • archive for required library could not be read or is not a valid ZIP file
  • [aniket@localhost Android]$ git push
    error: The requested URL returned error: 403 Forbidden while accessing
    fatal: HTTP request failed

    What is going wrong? There is no firewall or proxy and I have close by iptables service. Has anyone encountered this scenario before? What should be done?

    After following this answer (which kind of worked I got following error)

    [aniket@localhost Android]$ git push origin master
    The authenticity of host ' (' can't be established.
    RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added ',' (RSA) to the list of known hosts.
    Permission denied (publickey).
    fatal: The remote end hung up unexpectedly

    Any suggestions are appreciated.

  • Remove old committed file from git
  • Is it worth the effort to create pretty revision history in a DVCS?
  • in git, how to load commit into worktree and not index
  • How can I determine username from the Url of a remote repository?
  • Branching my own project from github, then pushing it back to github with branches intact
  • NetBeans 8.2 and Git: How to exclude from ignore files or directories. Vendor directory ignored by default
  • 3 Solutions collect form web for “error: The requested URL returned error: 403 Forbidden while accessing”

    The answer you mention suggests to change the url from an https one to an ssh one.

    That would only work if you have a ~/.ssh/id_rsa and ~/.ssh/, with the latter (public key) published in your GitHub ssh keys.

    Check your Egit ssh configuration.

    For step by step procedure as of how to generate SSH key and set it in your GitHub setting here is the link.

    So i faced the same problem with git to push the content to repository.

    Error info:

    error: The requested URL returned error: 403 Forbidden while accessing

    fatal: HTTP request failed

    Work around for me:

    This error is majorly due to the LOGIN credentials from your local machine in the git hub.
    You have to provide the username & password of github

    Add username: $ git config –global “bhanurhce”
    Username should be github’s user account.

    Confirm the username: $ git config

    once you try to push then it will ask for password:

    $ git push -u origin master
    Password:(provide your github’s password.)

    issue will be solved.

    Even if you still get error for askpass:

    Error info:
    [root@virtual-master git]# git push -u origin master

    (gnome-ssh-askpass:47356): Gtk-WARNING **: cannot open display:

    Then just solve it by command: $ unset SSH_ASKPASS

    All will work fine. Hope it helps..


    I had the same problem and the cause was that I was using https git access under my linux box. Pull was ok, while push ended with error. The solution was to switch to ssh access, ex:

    So first read remote url:

    $ git config --get remote.origin.url

    if you see https then change it to ssh, copy proper url from your github project www, and call:

    $ git remote set-url origin

    you might still need to put (and maybe also generate) .ssh public key to github. For that look into VonC answer.

    Git Baby is a git and github fan, let's start git clone.