How to deal with '403 Forbidden' error message when you try to push to a GitHub repository?

Problem

When you try to push changes to a GitHub repository from Hostginger Server using an HTTPS URL, if you receive the following error message:

error: The requested URL returned error: 403 Forbidden while accessing https://github.com/github-username/github-repository-name.git/info/refs

Cause

There are few possible causes for this problem:

  • You entered the wrong password. Verify that you are logging into the account with the right GitHub password.
  • A changed HTTPS URL is necessary for the Hostginger Server's Git client to function properly. If this is the issue, attempting to perform a push action does not even trigger the password prompt.

Resolution

There are two ways to fix the "403 Forbidden" issue if you are certain that you are using the right GitHub password:

  1. Using SSH. 
  2. Modification of the HTTPS URL.

 

Was this answer helpful?

Related Articles

How to make changes in repository?

Git makes it simple to update a repository. Using the git add command, you can update Git's file...

How to create a repository in GIT?

To build a Git repository, simply log in to your Hostginger hosting account through SSH and enter...

What is GIT?

All Hostginger Hosting Wordpress and Cloud accounts include the popular Git version control...

How to merge changes from one branch to another branch?

Type the following command to merge modifications from one branch into another. Replace name with...

How to clone a repository?

It is possible to "clone" repositories. Git creates an exact replica of an existing repository...