Eclipse、Git 和 Bitbucket - 无法推送 - 错误 401 未经授权

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

我对 Bitbucket 和 EGit 有疑问。我在 BitBucket 上创建了一个新的存储库,还在 Eclipse 中创建了一个新项目。当我尝试推送提交时,我收到以下错误消息:

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

我也试过 https://MyName@bitbucket.org/MyName/MyProject.git 但我得到了同样的错误。创建提交后,我使用带有 git push 的命令行进行推送,它 正常工作 。之后我尝试使用 Eclipse 和 EGit 进行推送,但我再次遇到同样的错误。我多次检查我的账户名和密码

我是否需要以某种方式配置 EGit 才能从 Eclipse 推送到 BitBucket?一个月前,我总是使用 EGit 毫无问题地推送到与 Eclipse 不同的主机上的存储库。

这取决于您的 Eclipse 和 Egit 版本。
对于最新的 Neon,有 thread reporting the same issue, and a ticket opened: bug 501000.

正在进行修复:Change 82187: "EGit Authenticator prevents login dialog"
已经 merged into master (also on the GitHub mirror:commit 39b391c and commit 10c65c7.
Change 82539 also just got merged 3 days ago.

因此 Marketplace Client Project 项目存储库 1.5.2 应该包含修复程序。
实际上,它被称为1.5.1a, but you can use http://download.eclipse.org/mpc/releases/1.5.2。作为 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.

EGit 本身也在进行修复:change 82295