Reputation: 765
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?
Upvotes: 30
Views: 125782
Reputation: 151
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.
Upvotes: 0
Reputation: 3589
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:
Upvotes: 8
Reputation: 1058
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.
Upvotes: 1
Reputation: 35
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
Upvotes: 2
Reputation: 21
This error is because of the upgrade. So you need to go to
Settings > Developer settings > Personal access tokens > Generate Token
https://www.youtube.com/watch?v=rLEYw1caoBQ
Upvotes: 0
Reputation: 111
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."
Upvotes: 3
Reputation: 1
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
Upvotes: 0
Reputation: 31
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.
Upvotes: 2
Reputation: 95
With the latest changes in GitHub, try this link. Now instead of actual password you need to pass token as password.
Upvotes: -1
Reputation: 1
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.
Upvotes: 0
Reputation: 107
Simple answer is - You don't have the write permission to the repo you are trying to push.
Upvotes: -1
Reputation: 393
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.
Upvotes: 0
Reputation: 1383
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.
Upvotes: -1
Reputation: 37
Surely your git user id and password are mismatched on configuration. Please recheck and make sure that your credentials are correct.
Upvotes: 0
Reputation: 21
I faced this issue with eGit and AnypointStudio ( with https protocol)
Solution-
Generate a access token in the respective Git repo Settings, save this token aside.
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.
Upvotes: 2
Reputation: 383
Since my organization requires us to use SSH keys instead of username+password the way to make it work for me was:
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)Upvotes: 0
Reputation: 948
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.
Upvotes: 1
Reputation: 1161
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!
Upvotes: 0
Reputation: 51
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.
Upvotes: 0
Reputation: 3897
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...
Upvotes: 14
Reputation: 1949
For some reasons egit doesn't seem to work with the Wincred credential store. You have to use the eclipse one.
Click on Configure Push then Change... button
Fill in the Authentication section
Make a Dry-Run to test
That should do the trick.
Upvotes: 1
Reputation: 1358
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 tohttps://<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
Upvotes: 2
Reputation: 129
just check "store in secure store" in context menu > team > remote > configure push to upstream > change. problem solved :D
Upvotes: 12
Reputation: 1259
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.
Upvotes: 26