How to Fix “git-upload-pack not permitted on” error while Git Pull and Push!

Hey Guys, You have landed here because probably, you are getting an error something like this – "git-upload-pack not permitted on" in your eclipse or on the git command line for repositories using https:// protocol

Error

https://github.com/<<your github>>/<<your repository>>.git: git-upload-pack not permitted on 'https://github.com/<<your github>>/<<your repository>>.git/'
How to Fix "git-upload-pack not permitted on" error while Git Pull and Push!
How to Fix “git-upload-pack not permitted on” error while Git Pull and Push!

Solution

The good news is – there is a solution to it. But a pre-context – As per a blog post on GitHub, about deprecating password authentication:

GitHub no longer supports basic authentication using a username and password. Instead, we recommend using personal access tokens or the web application flow.

What it means is that the password you are trying to do your git push or git fetch from upstream is not able to recognize the credentials and hence fails.

Simple Solution: You need to create an access token and use that instead of the password that you have been using till now.

Follow the below steps to resolve the issue:

Step 1

Go to your GitHub account and follow the steps mentioned in this GitHub documentation to generate your access token – https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

Step 2

Once you have created the access token and copied it, go to Eclipse. Right-click on the repository you want to pull, clone or push -> go to remote and configure the “Configure fetch from upstream” or the “Configure push to upstream”

How to Fix "git-upload-pack not permitted on" error while Git Pull and Push!
How to Fix “git-upload-pack not permitted on” error while Git Pull and Push!

In the next popup click on the change button and in the next configuration box, enter the newly copied access token in the password field click on finish, and then click on Save and fetch in the main popup.

How to Fix "git-upload-pack not permitted on" error while Git Pull and Push!
How to Fix “git-upload-pack not permitted on” error while Git Pull and Push!

This time it should work. It will simply use the access token to verify your credentials and fetch from the GitHub repository. Alternatively, you can also try to see if the git pull or other git commands work well on git bash.

Feel free to share your thoughts on this topic in the comments section below 👇 We would be happy to hear and discuss the same 🙂

Spread the word!
0Shares

Leave a comment

Your email address will not be published. Required fields are marked *

2 thoughts on “How to Fix “git-upload-pack not permitted on” error while Git Pull and Push!”