Eclipse,Git和Bitbucket - 无法推送 - 错误401未经授权 [英] Eclipse, Git and Bitbucket - Can't push - Error 401 Unauthorized

查看:373
本文介绍了Eclipse,Git和Bitbucket - 无法推送 - 错误401未经授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

 无法连接到任何存储库:https:/ /bitbucket.org/MyName/MyProject.git 
(https://bitbucket.org/MyName/MyProject.git:401未经授权)

我也尝试过 https://MyName@bitbucket.org/MyName/MyProject.git 但我收到相同的错误。在创建提交之后,我使用 git push 命令行,并且它没有问题工作。之后,我尝试用Eclipse和EGit推送,但是我再次收到相同的错误。我多次检查了我的帐户名和密码。



我需要以某种方式配置EGit,以便可以从Eclipse推送到BitBucket?一个月前,我一直推送到与EGit不同的主机上的存储库,没有问题。

解决方案

这取决于你Eclipse和Egit版本。

使用最新的Neon,有一个线程报告相同的问题,并打开一张票:错误501000



正在进行修复:更改82187:EGit身份验证器阻止登录对话框

它已经是合并到主(也可以在GitHub镜像上:提交39b391c 提交10c65c7

更改82539 也只是在 3天前合并



所以Marketplace Client Project项目库1.5.2应该包括修复。

实际上,它被称为 1.5.1a ,但您可以使用 http ://download.eclipse.org/mpc/releases/1.5.2 。作为一个URL。


如果您使用的是Eclipse Neon,您还可以从Neon存储库安装EPP Marketplace Client。点击帮助>安装新软件,键入 neon ,选择氖存储库URL,选择协作> Eclipse EPP Marketplace客户端,然后点击安装


EGit本身还有一个修复过程:更改82295


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.

解决方案

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.

这篇关于Eclipse,Git和Bitbucket - 无法推送 - 错误401未经授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆