在 BitBucket 上使用 NetBeans + Git 出现 401 未授权错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8016396/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 06:08:40  来源:igfitidea点击:

401 Unauthorized error using NetBeans + Git on BitBucket

gitnetbeanspushbitbucketunauthorized

提问by Valentin Stoianoff

I have a local git repository. Recently I have added a remote repository from bitbucket, and have pushed my branch there without any problem by: git push bitbucket(since I've configured username and password in https url). But when I try to push, using NetBeans, I always get 401 Unauthorized, when I choose from configured remote repos list and when I try to enter the remote repo details manually. I have the most recent version of NetBeans and Git plugin.

我有一个本地 git 存储库。最近我从 bitbucket 添加了一个远程存储库,并通过以下方式将我的分支推送到那里,没有任何问题:git push bitbucket(因为我已经在 https url 中配置了用户名和密码)。但是,当我尝试使用 NetBeans 推送时,当我从配置的远程存储库列表中进行选择以及尝试手动输入远程存储库详细信息时,总是会收到401 Unauthorized。我有最新版本的 NetBeans 和 Git 插件。

Thanks for any help in advance.

提前感谢您的任何帮助。

采纳答案by Hermes

It is a bug in NetBeans. Seams fixed in NetBeans 7.2, and looks even better in NetBeans 7.3, so perhaps you could try an upgrade. I find it stable and reliable.

这是 NetBeans 中的一个错误。在 NetBeans 7.2 中修复了接缝,在 NetBeans 7.3 中看起来更好,所以也许您可以尝试升级。我觉得它稳定可靠。

Note that you can have more than one version of NetBeans installed just in case you need to switch, and since you use git and push, you should not fear losing data.

请注意,您可以安装多个版本的 NetBeans,以防万一您需要切换,而且由于您使用 git 和 push,因此您不必担心丢失数据。

回答by VonC

Are you using the right version of Git, as mentioned in this thread?

本主题所述,您使用的是正确版本的 Git吗?

I had the same problem. Which version of Git are you running? (git --version will tell you.)

Prior to 1.6.6, Git didn't support "smart" HTTP.
Bitbucket doesn't support "dumb" HTTP, so you'll need to upgrade to a newer version of Git.

我有同样的问题。你运行的是哪个版本的 Git?(git --version 会告诉你。)

在 1.6.6 之前,Git 不支持“智能” HTTP
Bitbucket 不支持“哑”HTTP,因此您需要升级到更新版本的 Git。