bash Git错误远程:空密码

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

Git error remote: Empty password

gitbashgithubbitbucket

提问by Naor Shoyhat

I'm trying to clone my git repo from bitbucket, and when I enter this command:

我正在尝试从 bitbucket 克隆我的 git repo,当我输入此命令时:

git clone https://[email protected]/naor_shoyhat/hello-world.git

The bash then prompts me a window with areas to enter username and password.

然后 bash 会提示我一个窗口,其中包含输入用户名和密码的区域。

I enter them and then I receive this error:

我输入它们,然后收到此错误:

remote: Empty password
fatal: Authentication failed for 'https://[email protected]/naor_shoyhat/hello-world.git/'

回答by Shin-Bang Tsai

I'm using git(2.12.2) 64-bit on Windows 10. My solution is simply close the login window which you have to type account and password, and a SSh window will pop out, then you type your password.

我在 Windows 10 上使用 git(2.12.2) 64 位。我的解决方案是关闭您必须输入帐户和密码的登录窗口,然后会弹出一个 SSh 窗口,然后您输入密码。

回答by Miguel A.

I know my answer is very late. But I am going to explain to fix this problem on windows step by step. After upgrading SourceTree version 2.1.10, we can see like that.

我知道我的回答很晚了。但是我将在 Windows 上逐步解释以解决此问题。升级SourceTree 2.1.10版本后,我们可以看到这样。

SourceTree stores credentials in the Windows credential manager. To see and remove them, do the following:

SourceTree 将凭据存储在 Windows 凭据管理器中。要查看和删除它们,请执行以下操作:

  1. Click on User Accounts in Control Panel.
  2. In the left-hand list of links, click Manage Your Credentials.
  3. When the Manage Your Credential page opens, it shows your Web Credentials. Click on the "Windows Credentials" button. enter image description here

  4. In the list(Windows Credentials), look for entries that start with "git:http". Remove these entries.

  5. And Please delete a file - C:\Users\\AppData\Local\Atlassian\SourceTree\passwd
  6. Source tree app re-open and work on this. If the app needs password, you can input.
  1. 单击控制面板中的用户帐户。
  2. 在左侧的链接列表中,单击管理您的凭据。
  3. 当“管理您的凭据”页面打开时,它会显示您的 Web 凭据。单击“ Windows 凭据”按钮。 在此处输入图片说明

  4. 在列表(Windows 凭据)中,查找以“git:http”开头的条目。删除这些条目。

  5. 并请删除一个文件 - C:\Users\\AppData\Local\Atlassian\SourceTree\passwd
  6. 源树应用程序重新打开并处理此问题。如果应用程序需要密码,您可以输入。

All done. Hope to help you.

全部完成。希望能帮到你。

回答by VaSk0_A

You can try:

你可以试试:

git clone https://naor_shoyhat:<password>@bitbucket.org/naor_shoyhat/hello-world.git

It worked for me in a pinch, but I do agree that it is not the best solution.

它在紧要关头对我有用,但我同意这不是最好的解决方案。

回答by Rafael Paredes

If a pop up window ask for username and password close it, then introduce the password in the commandline.

如果弹出窗口要求输入用户名和密码,请关闭它,然后在命令行中输入密码。

It seems that is a bug on windows that sends an empty password to bitbucket. I use windows 10.

这似乎是 Windows 上的一个错误,它向 bitbucket 发送了一个空密码。我使用 Windows 10。

回答by Md. Abu Bakker Siddique

Tools->Options->Git-> Update Embedded Git.

工具->选项->Git-> 更新嵌入式 Git。

I did have to do this twice because there were issues extracting the first download.

我确实必须这样做两次,因为在提取第一次下载时出现问题。

回答by Simon Tewsi

I don't know which operating system you're using but in Windows there was a bug in the Git Credential Manager for Windows (GCM), v1.9, which I believe was bundled with git v2.12.1 for Windows.

我不知道您使用的是哪个操作系统,但在 Windows 中,Git Credential Manager for Windows (GCM) v1.9 中存在一个错误,我认为它与适用于 Windows 的 git v2.12.1 捆绑在一起。

It resulted in a "remote: empty password" error when trying to authenticate to BitBucket.

在尝试对 BitBucket 进行身份验证时,它导致了“远程:空密码”错误。

The issue was fixed in version 1.10 of GCM. The latest GCM installer can be found at: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases

该问题已在 GCM 1.10 版中修复。可以在以下位置找到最新的 GCM 安装程序:https: //github.com/Microsoft/Git-Credential-Manager-for-Windows/releases

The details of the issue can be found at: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/399The issue was raised on 24 March 2017, roughly about the time you started seeing your authentication problem.

该问题的详细信息可以在以下位置找到:https: //github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/399该问题于 2017 年 3 月 24 日提出,大约是您开始看到您的身份验证问题。

回答by djkp

This issue mentioned in link and comments in that - remove password file solved this problem for me

链接和评论中提到的这个问题 - 删除密码文件为我解决了这个问题

reference

参考

回答by shmulik.r

reinstall git for windows, thats worked for me.

为 Windows 重新安装 git,这对我有用。

回答by raychi

Git v2.12.2.2released on 2017-04-05 fixed the issue for me.

2017年 4 月5日发布的Git v2.12.2.2为我解决了这个问题。

回答by Jefferson Reis

If you've tried all the possibilities and the problem persists, try this:

如果您已经尝试了所有可能性但问题仍然存在,请尝试以下操作:

  1. Close SourceTree

  2. Click on User Accounts in Control Panel.

  3. In the left-hand list of links, click Manage Your Credentials.

  4. When the Manage Your Credential page opens, it shows your Web Credentials. Click on the "Windows Credentials" button.

  5. In the list (Windows credentials), look for entries that relate to SourceTree. Remove all these entries. Be very careful in this step.

  6. And Please delete this folder: - C:\Users\AppData\Local\Atlassian

    If you can not delete, restart your computer

  7. Uninstall SourceTree

  8. Install SourceTree again

  1. 关闭源树

  2. 单击控制面板中的用户帐户。

  3. 在左侧的链接列表中,单击管理您的凭据。

  4. 当“管理您的凭据”页面打开时,它会显示您的 Web 凭据。单击“ Windows 凭据”按钮。

  5. 在列表(Windows 凭据)中,查找与SourceTree相关的条目 。删除所有这些条目。这一步要非常小心。

  6. 并请删除此文件夹:- C:\Users\AppData\Local\Atlassian

    如果无法删除,请重启电脑

  7. 卸载 SourceTree

  8. 再次安装 SourceTree

Note that the location of the Gitinstallation may influence this procedure.

请注意,Git安装的位置可能会影响此过程。

That was the only method that works for me. I'm using Windows 8.1 64-bit.

那是唯一对我有用的方法。我使用的是 Windows 8.1 64 位。