Push 不允许使用 git-receive-pack
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10475726/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
git-receive-pack not permitted on Push
提问by Simon Sheehan
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:
我在 Eclipse 中使用 EGit,并尝试推送到 Github。我在本地进行了提交,然后尝试将其推送到上游。我收到此错误:
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?
我似乎无法找到解决方法。我在这里错过了什么吗?
回答by Venkat
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
我知道这是一个旧线程,但今天我用同样的方法挣扎了一个多小时,终于发现发生了这种情况,因为在我的 egit 推送对话框窗口中,我使用了不同的用户 ID
Once i entered the right github user, the push to the remote repository went through fine.
一旦我输入了正确的 github 用户,推送到远程存储库就会顺利进行。
回答by fl0w
As stupid as it may sound: Make sure you do have rights to push to the repo.
听起来很愚蠢:确保您确实有权推送到 repo。
In my case the colleague hadn't given my user the push rights yet...
在我的情况下,同事还没有给我的用户推送权限......
回答by user3620506
just check "store in secure store"in context menu > team > remote > configure push to upstream > change. problem solved:D
只需在上下文菜单 > 团队 > 远程 > 配置推送到上游 > 更改中选中“存储在安全存储中”。问题解决了:D
回答by Charleston
sometimes you need to verify your account e-mail on github
有时你需要在 github 上验证你的账户邮箱
回答by Jonathan Benn
git-receive-pack not permitted
is equivalent to username/password not recognized
git-receive-pack not permitted
相当于 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)
- 您在 Github 上没有帐户
- 您没有通过电子邮件验证来完成您在 Github 上的帐户
- 您的用户名没有对该存储库的推送权限(例如,您的用户名未列为贡献者)
- 您不小心使用了错误的用户名(替换为对该存储库没有推送权限的用户名)
- 您输入的密码错误
- 您使用错误的协议进行推送(例如,您使用了 SSH 或 HTTPS,而只有其他协议是可以接受的)
回答by Vlad.Bachurin
In my case I had to accept the invitation to the organization on Github.
就我而言,我不得不在 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
嗨
<username>
,
<other_username>
已邀请您加入<org_name>
GitHub 上的组织。头以上,以https://<github_address>/<org_name>
检查出<org_name>
的资料。要加入
<org_name>
,请点击以下链接:
https://<github_address>/orgs/<org_name>/invitation?via_email=1
一些有用的提示:
- 如果您收到 404 页面,请确保您以
<username>
.- 您也可以通过直接访问组织页面来接受邀请
https://<github_address>/<org_name>
如果您不希望收到此邀请,则可以忽略此电子邮件。
谢谢,GitHub 团队
回答by webpat
For some reasons egit doesn't seem to work with the Wincred credential store. You have to use the eclipse one.
由于某些原因,egit 似乎不适用于 Wincred 凭证存储。你必须使用日食之一。
- Open the Git Repositoriesperspective.
- Open the Remotesnode and right click on origin (or the remote of your choice).
Click on Configure Pushthen Change...button
Fill in the Authenticationsection
Make a Dry-Run to test
- 打开Git 存储库透视图。
- 打开Remotes节点并右键单击 origin(或您选择的远程)。
单击配置推送然后更改...按钮
填写身份验证部分
进行试运行以进行测试
That should do the trick.
这应该够了吧。
回答by Derek
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.
就我而言,这是因为权限。我们做了一些从 gitlab 到 github 的迁移。我的同事从我正在处理的旧项目中创建了一个私人项目。完成后,我发现我无法推送并出现此错误。最后,我们发现是因为我没有被添加到这个项目的合作者中。我认为它应该自动完成,因为我已经是这个项目的贡献者之一。希望对有类似问题的人有所帮助。
回答by Ganesh Giri
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.
如果您在使用 Git 时遇到 git-receive-pack not allowed 错误,很可能是您的配置问题。就我而言,我已经使用 https 克隆了存储库(需要身份验证)。但是,由于上述错误,推送失败。这是因为我只被允许通过 SSH 推送。因此,一旦我更改了结帐配置中的协议,一切又都好了。
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.
由于我使用 Eclipse(和 eGit),因此有些人知道可以通过项目的上下文菜单(右键单击)访问 Git 克隆项目的配置设置,然后选择 Team、Remote 和“Configure Fetch从上游“或配置推送到上游”,如适用。
Hope this helps!
希望这可以帮助!
回答by Keyser Soze
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.
我在推送到 GitLabusername
存储库时遇到了这个错误,我使用的没有权限推送到分支的存储库。
Changed the permission's level from reporter
to master
solved the problem.
将权限级别从更改reporter
为master
解决了问题。