30

I am using EGit in Eclipse, and attempting to push to Github. I made a commit locally, and then tried to push it upstream. I got this error:

 Can't connect to any URI: https://github.com/Buroa/Konklex.git (An internal Exception occurred during push: https://github.com/Buroa/Konklex.git: git-receive-pack not permitted)

I can't seem to find a way around it. Am I missing something here?

6

25 Answers 25

25

I know this is a old thread, but I struggled with the same for more than an hour today and finally found out this happened because on my egit push dialog window i had used a different userid

Once i entered the right github user, the push to the remote repository went through fine.

5
  • I had to reconfigure the push, with both my username and password, and check the "Store in Secure Store"
    – chrismarx
    Apr 8, 2014 at 18:18
  • 1
    same here. I already had other projects in Eclipse which were using a user that was not a collaborator in the new project.
    – atmelino
    Jun 11, 2014 at 2:36
  • Thanks. This is basically a very weird error message for "username/password not recognized" Apr 13, 2017 at 16:00
  • How to do this ?
    – nonozor
    Feb 26, 2019 at 8:39
  • 1
    Note: GitHub recently changed its Authentication policy. Users have to use Personal Access Token (P.A.T) instead of password while doing pull or push or clone etc. Take a look at: docs.github.com/en/github/authenticating-to-github/…
    – Shadyar
    Aug 14, 2021 at 23:57
14

As stupid as it may sound: Make sure you do have rights to push to the repo.

In my case the colleague hadn't given my user the push rights yet...

1
  • 3
    This is the typical reason why I encounter the error Sep 28, 2017 at 18:03
12

just check "store in secure store" in context menu > team > remote > configure push to upstream > change. problem solved :D

1
  • 2
    The context menu entry was greyed out for me. Underlying reason for me was missing rights to push on the repo.
    – fl0w
    Mar 28, 2017 at 14:43
8

git-receive-pack not permitted is equivalent to username/password not recognized

As others have posted, you could get the error message for many different reasons, including:

  • You don't have an account on Github
  • You didn't do the email verification to complete your account on Github
  • Your username does not have push rights to that repository (e.g. your username is not listed as a contributor)
  • You used the wrong username by accident (substituting with one that does not have push rights on that repository)
  • You entered the password wrong
  • You pushed using the wrong protocol (e.g. you used SSH or HTTPS, when only the other protocol was acceptable)
  • You provided the correct authentication but the email address you sent with it did not match what the server was expecting
4
  • I was using token instead a user/pass (so my credentials are fine) , but my mistake was the user registered at the commit (not the user to push to remote). Hope helps. Aug 23, 2022 at 9:59
  • @danipenaperez I'm not sure I understand. What does "the user registered at the commit" mean? Aug 29, 2022 at 19:13
  • I'm not using http+basic auth to push my changes to remote git, I am using ssh key instead, so I will never could get a user/pass error. But in this scenario, when I do a local commit an email user needs to be configured locally. My mistake was configure [email protected] in local git configuration, but my email registered on remote git server was [email protected], so on push commits y receive the git-receive-pack not permitted error (remember that I can push my changes because I am using ssh key, but remote git checks that email at merge request commit that matchs with associated ssh account email). Aug 31, 2022 at 7:10
  • Thanks for the clarification @danipenaperez . I have added your specific case to the list. Sep 1, 2022 at 13:01
7

sometimes you need to verify your account e-mail on github

2
  • 4
    This answer seems like it could use more detail. Nov 1, 2013 at 18:57
  • how and where do you do that?
    – Deian
    May 3, 2022 at 14:44
2

In my case I had to accept the invitation to the organization on Github.

Initially, I was trying to push my changes and was getting the mentioned error.

After I clicked on the link from the invitation letter, my push succeeded. Look for the email with the following content in your inbox and click on the link to join:

Hi <username>,

<other_username> has invited you to join the <org_name> organization on GitHub. Head over to https://<github_address>/<org_name> to check out <org_name>'s profile.

To join <org_name>, follow this link:

https://<github_address>/orgs/<org_name>/invitation?via_email=1

Some helpful tips:

  • If you get a 404 page, make sure you're signed in as <username>.
  • You can also accept the invitation by visiting the organization page directly at https://<github_address>/<org_name>

If you were not expecting this invitation, you can ignore this email.

Thanks, The GitHub Team

2

I faced this issue with eGit and AnypointStudio ( with https protocol)

Solution-

  1. Generate a access token in the respective Git repo Settings, save this token aside.

  2. Go to Git Repositories -> Your Project -> Remotes -> origin -> Right click on Push(Red Arrow) and select Change Credentials.

Enter the access token generated in the first step in the password box and username,save and try to Push your local commit now.

For me it worked.

2

After the latest github update you cannot use password to access. Instead use 2FA or generate a token and place it in password field. Follow the link below.

Generate token

2

I resolved this using PATs(Personal Access Tokens). You can use the combination of PATs with usernames instead of passwords.

Follow this github guideline: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub when using the GitHub API or the command line.

If you want to use a PAT to access resources owned by an organization that uses SAML SSO, you must authorize the PAT. For more information, see "About authentication with SAML single sign-on" and "Authorizing a personal access token for use with SAML single sign-on."

2

In newer updates of GitHub, applications are not allowed direct access to your account repositories. To overcome this, you have to create a token from "Settings > Developers > Create Token with Repository Rights" and use that instead of your password in eclipse or any other application. This will work. All the answers above are for before the update, so they won't solve the problem.

For a more detailed guide, you can refer to this video (it's not mine): https://www.youtube.com/watch?v=8x0ywtCOzxo

1
1

For some reasons egit doesn't seem to work with the Wincred credential store. You have to use the eclipse one.

  1. Open the Git Repositories perspective.
  2. Open the Remotes node and right click on origin (or the remote of your choice).
  3. Click on Configure Push then Change... button

  4. Fill in the Authentication section

  5. Make a Dry-Run to test

That should do the trick.

1

I encountered this error when pushing to a GitLab repo, the username I was using does not have permissions to push to the branche's repository.

Changed the permission's level from reporter to master solved the problem.

1

for people wondering how to fix this for Bitbucket repo + eclipse IDE

go to Preferences->Git and then change Http Client to Java built-in HTTP

This resolved the issue for me.

1
  • Thanks! Save my day as well, Just wondering if it's working on VS but not in eclipse!
    – TheFoxLab
    Jan 7, 2022 at 4:19
0

In my case, it was because the permissions. we did some migration from gitlab to github. My colleague created a private project from our old project which I was working on. And after I finished, I found I was not able to push and got this error. Finally, we found it was because I wasn't added to the collaborator of this project. I thought it should be automatically done since I am one of the contributors of this project already. Hope it would be helpful for someone with similar issue.

0

If you ever run into a git-receive-pack not permitted error when using Git, chances are that it's a configuration issue on your end.In my case, I had cloned the repository using via https (which required authentication). However, pushing failed with the aforementioned error. This was due to the fact that I was only allowed to push via SSH. Therefore, once I changed the protocol in the configuration for my checkout, all was well again.

Since I use Eclipse (and eGit), it might be handy for some to know that the configuration settings for a Git-cloned project can be accessed via the project's context menu (right click), and choosing Team, Remote, and "Configure Fetch from upstream" or Configure Push to upstream", as applicable.

Hope this helps!

0

Since my organization requires us to use SSH keys instead of username+password the way to make it work for me was:

  1. Right-click on your project in Eclipse --> Team --> Remote --> Configure Push to Upstream
  2. Next to the URI click on "Change"
  3. Choose protocol ssh
  4. Under Authentication --> User insert git (it seems that eclipse / git will automatically search for your id_rsa key file if you use the default username here - I tried adding my real username but that never worked)
  5. Finish & Save and Push
0

Surely your git user id and password are mismatched on configuration. Please recheck and make sure that your credentials are correct.

0

Another issue could be that you have not checked all necessary checkboxes when creating the personal access token for Github.

In my case this was my mistake and by creating a new token with all rights / checkboxes checked when creating the personal access token, it worked fine.

0

Go to Bitbucket - Personal Settings - Access Management - App Passwords - Click 'Create app password' Button

Provide any name in 'Label' fields

Select all check boxes in Permissions Section

Click 'Create' Button

A Password will be generated. Copy this Password and save it to any local text file.

Go to Credential Manager - Windows Credential Manager

Delete the Bitbucket Logins saved.

Now go to Eclipse and try to do Commit and Push again

When prompted for Password, Provide the copied generated app password.

Now the Commit and Push should be successful without git-receive.-pack not permitted Error.

enter image description here

0

Stumbled upon this for a long time and finally found the answer. In the Password section, we should not be entering the GitHub login password, instead we have to enter the Personal Access Token. Below link shows how to create the Personal Access Token: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – Tyler2P
    Aug 18, 2021 at 10:24
  • @Tyler2P I do agree with your point. But in this case, the answer to the question would be to enter Personal Access Token instead of Password, and the link shared just talks about how to setup Personal access token just in case someone doesn't know. Aug 19, 2021 at 18:16
0

Try this

This error is because of the upgrade. So you need to go to

Settings > Developer settings > Personal access tokens > Generate Token

  1. Select the first option & click generate
  2. Use this generated token as password of git

https://www.youtube.com/watch?v=rLEYw1caoBQ

0

In my case, I resolved this issue by changing the GitHub token, I regenated the token and given in eclipse. by the way I used the Fine grained token on github.

we need to give the permissions for token users.

enter image description here

-1

Very basic but it happened to me: I didn't verify my email. Check you email, press the "verify email" button and then try pushing again.

-1

Simple answer is - You don't have the write permission to the repo you are trying to push.

-1

With the latest changes in GitHub, try this link. Now instead of actual password you need to pass token as password.

Refer - https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

Not the answer you're looking for? Browse other questions tagged or ask your own question.