Bitbucket, Windows and "fatal: could not read Password for"
WindowsGitBitbucketWindows Problem Overview
I recently reinstalled Windows and I have a problem with downloading files from repository.
I have installed GIT and Python, but when I am trying to download anything from Bitbucket I get the message:
"fatal: could not read Password for: 'https://[email protected]': No such file or directory".
What am I doing wrong?
Windows Solutions
Solution 1 - Windows
I solved it setting a global parameter:
git config --global core.askpass /usr/libexec/git-core/git-gui--askpass
Solution 2 - Windows
Try to include your username and password in the URL like this:
git clone https://username:[email protected]/path_to/myRepo.git
Solution 3 - Windows
I had the same problem an hour or so ago. My issue was that I was trying to do a git clone but using the https url instead of the ssh one. If you go to your repository you can select ssh or https from the dropdown for the clone url. Hope that helps!
Solution 4 - Windows
Just solved this Problem
Git in Version 1.8.5.2 contains a but using bitbucket, updating my Git to Version 1.9.0 solved this problem.
Solution 5 - Windows
I just tried to do the same thing and it did not work for me, and I too recently reinstalled windows on my machine.
I am used to checking out a private repo from my bitbucket account by using the simple command
git clone https://[email protected]/username/repo.git
and then being prompted to enter a password for my user.
It looks like this might be broken in version 1.8.5.2. I downgraded to version 1.8.4 and it started working as expected.
Git download list: http://code.google.com/p/msysgit/downloads/list
Hope this helps!
Solution 6 - Windows
For https connections try installing the "Git Credential Store" (an "optional" step in the BitBucket tutorial).
This is how to install it:
- Download git-credential-winstore.exe from http://gitcredentialstore.codeplex.com/
- Open the Git Bash Shell and change the current directory to where git-credential-winstore.exe is located
- Run
./git-credential-winstore -i /bin/git
Solution 7 - Windows
Try to use git fetch
in order to reenter and update the outdated password.
I had the similar issue. The cached password become invalid due to updating the actual password to new one. But git didn't ask me for reentering the valid password and just gave me an error that Authentication failed
while I was trying to pull changes.
But magically, git asked me for the actual password when I typed git fetch
instead of pulling the data. Once I entered the new password, apparently git updated the old one in its credentials storage and no longer asked me about the entering password again.
Solution 8 - Windows
FIX IT (09/2020)
All the the answers here are wrong... You shouldn't NEVER do something like that:
https://username:**PASSWORD**@Bitbucket.org
SOLUTION All you have to do is:
- Go to Sourcetree -> Preferences -> Git
- You will have the section "Git Version" with 2 options: Reset to ebedded Git and Use System Git
Sourcetree use the Ebedded git for default. Click on "Use System Git" and.... Fixed!
Solution 9 - Windows
In my case, the problem was with the global file .gitconfig
on Windows.
When I tried to use solution provided by @jsarroyo in Git BASH, I got an error saying that the file .gitconfig.lock
did not exist. I could find no way to fix it.
When I completely removed .gitconfig
, everything worked fine.
WARNING: This way, you lose all your git settings and you need to configure it again.
Solution 10 - Windows
In my case, it was just a wrong password for bitbucket entered into the prompt dialog. When I entered the correct password, the error disappeared.
Solution 11 - Windows
In your project go to .git/config
and add after username :password
before : https://[email protected]/repo.git
afetr : https://username:[email protected]/repo.git
Solution 12 - Windows
I got this issue when I upgraded from Windows 7 to 8 and settings messed up for me too. I had to regenerate private and public keys, and change my TortoiseGIT to use plink, instead of SSH.exe
I wrote step by step instructions at http://techblog.saurabhkumar.com/2015/09/using-tortoisegit-on-windows-with.html
Solution 13 - Windows
For Bitbucket If you are ok for the repo to be public you can just uncheck the "This is a private repository" checkbox in repo settings. Now a simple git clone should work.