可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I'm trying to clone my git repo from bitbucket, and when I enter this command:
git clone https://naor_shoyhat@bitbucket.org/naor_shoyhat/hello-world.git
The bash then prompts me a window with areas to enter username and password.
I enter them and then I receive this error:
remote: Empty password
fatal: Authentication failed for 'https://naor_shoyhat@bitbucket.org/naor_shoyhat/hello-world.git/'
回答1:
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.
回答2:
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.
SourceTree stores credentials in the Windows credential manager. To see and remove them, do the following:
- Click on User Accounts in Control Panel.
- In the left-hand list of links, click Manage Your Credentials.
When the Manage Your Credential page opens, it shows your Web Credentials.
Click on the "Windows Credentials" button.
In the list(Windows Credentials), look for entries that start with "git:http". Remove these entries.
- And Please delete a file - C:\Users\\AppData\Local\Atlassian\SourceTree\passwd
- Source tree app re-open and work on this. If the app needs password, you can input.
All done. Hope to help you.
回答3:
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.
回答4:
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.
回答5:
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.
It resulted in a "remote: empty password" error when trying to authenticate to 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
The details of the issue can be found at: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/399 The issue was raised on 24 March 2017, roughly about the time you started seeing your authentication problem.
回答6:
Tools->Options->Git-> Update Embedded Git.
I did have to do this twice because there were issues extracting the first download.
回答7:
reinstall git for windows, thats worked for me.
回答8:
Git v2.12.2.2 released on 2017-04-05 fixed the issue for me.
回答9:
If you've tried all the possibilities and the problem persists, try this:
Close SourceTree
Click on User Accounts in Control Panel.
In the left-hand list of links, click Manage Your Credentials.
When the Manage Your Credential page opens, it shows your Web
Credentials. Click on the "Windows Credentials" button.
In the list (Windows credentials), look for entries that relate to
SourceTree. Remove all these entries. Be very careful in this step.
And Please delete this folder: - C:\Users\AppData\Local\Atlassian
If you can not delete, restart your computer
Uninstall SourceTree
Install SourceTree again
Note that the location of the Git installation may influence this procedure.
That was the only method that works for me. I'm using Windows 8.1 64-bit.
回答10:
This issue mentioned in link and comments in that - remove password file solved this problem for me
reference