Eclipse, Git and Bitbucket - Can't push - Error 401 Unauthorized

こ雲淡風輕ζ 提交于 2019-12-06 23:45:46

问题


I have a problem with Bitbucket and EGit. I created a new repository on BitBucket and also a new project in Eclipse. When I try to push a commit, I get the following error message:

Can't connect to any repository: https://bitbucket.org/MyName/MyProject.git 
(https://bitbucket.org/MyName/MyProject.git: 401 Unauthorized)

I also tried https://MyName@bitbucket.org/MyName/MyProject.git but I got the same error. After creating the commit, I pushed by using the command line with git push and it worked without a problem. After that I tried pushing with Eclipse and EGit but I got the same error again. I checked my account name and password multiple times.

Do I need to configure EGit in some way to make it possible to push from Eclipse to BitBucket? A month ago I always pushed to a repository on a different host from Eclipse with EGit without a problem.


回答1:


It depends on your version of Eclipse and Egit.
With the very latest Neon, there is a thread reporting the same issue, and a ticket opened: bug 501000.

There is a fix in progress: Change 82187: "EGit Authenticator prevents login dialog".
It is already merged into master (also on the GitHub mirror:commit 39b391c and commit 10c65c7.
Change 82539 also just got merged 3 days ago.

So Marketplace Client Project project repository 1.5.2 should include the fix.
Actually, it is called 1.5.1a, but you can use http://download.eclipse.org/mpc/releases/1.5.2. as an url.

If you are using Eclipse Neon you may also install EPP Marketplace Client from the Neon repository. Click Help > Install New Software, type "neon", select the Neon repository URL, select Collaboration > Eclipse EPP Marketplace Client and click Install.

There is also a fix in progress for EGit itself: change 82295.



来源:https://stackoverflow.com/questions/39924175/eclipse-git-and-bitbucket-cant-push-error-401-unauthorized

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!