Cannot push to Bitbucket via https anymore: git returns fatal error
Solution 1
What I did was to change the protocol from HTTPS to GIT.
Followed the instructions to setup SSH here: https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git
(easy from the GitBash console, you don't need to install SSH or nothing, all comes with Git)
After you completed the SSH setup, just re-add the remote with the git@bitbucket.... url and you are done.
Hope this helps.
I have installed Git version 1.8.5.2-preview20131230
Solution 2
I solved this by adding my password in the url.
Instead of:
git remote add origin https://[email protected]/MYUSERNAME/test.git
I used:
git remote add origin https://MYUSERNAME:[email protected]/MYUSERNAME/test.git
Solution 3
I got this error when updated git to 1.8.5.2. When I rolled git to version 1.7.10 (initial version), the error disappeared.
Solution 4
As I really needed to use HTTPS instead of SSH (proxy limitations), I've solved it by setting the remote push url
to the HTTPS url as follow:
git remote set-url --push origin https://[email protected]/MYUSERNAME/test.git
git version 1.9.5
Solution 5
I had the same problem. Installing Git 1.9.0 solved it for me.
Jabbath
Updated on June 07, 2022Comments
-
Jabbath almost 2 years
I recently reinstalled windows and got the latest version of git. I created a new repo on Bitbucket and ran
git remote add origin https://[email protected]/MYUSERNAME/test.git
then I ran
git push -u origin --all
however this gave me the error
fatal: could not read Password for 'https://[email protected]': No such file or directory
before I would just get a prompt asking me for my username and password, and the push worked fine. I've tried reverting to Git 1.7.11 but this didn't do anything.
-
Krzysztof Jabłoński about 9 yearsThat's kinda intimidating. Won't a guy with a net wire sweeper see your password as you type it along with the username and the target?