12

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://MYUSERNAME@bitbucket.org/MYUSERNAME/test.git

then I ran

git push -u origin --all

however this gave me the error

fatal: could not read Password for 'https://MYUSERNAME@bitbucket.org': 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.

informatik01
  • 16,038
  • 10
  • 74
  • 104
Jabbath
  • 334
  • 1
  • 3
  • 11
  • 1
    We had this question a lot in the past few days—unfortunately without a clear solution. Can you try removing the remote again using `git remote remove origin` and then readding it? – poke Jan 05 '14 at 00:53
  • @poke still the same error, I have managed to push by adding this as origin `https://MYUSERNAME:MYPASSWORD@bitbucket.org/MYUSERNAME/test.git` but this doesnt help for cloning – Jabbath Jan 05 '14 at 00:59
  • Hi, I am having the same issue, I just installed version 1.8.5.2-preview20131230. Can you please post which version you installed first? Thanks – Leonardo Brambilla Jan 05 '14 at 13:22
  • This is due to a bug in release 1.8.5.2 as explained here http://stackoverflow.com/questions/20882088/cant-push-after-git-update. – David Jan 20 '14 at 14:43
  • Please go to the link a follow the steps: [http://stackoverflow.com/a/44027171/5297884](http://stackoverflow.com/a/44027171/5297884) – Johan Morales May 17 '17 at 17:24

7 Answers7

15

I solved this by adding my password in the url.

Instead of:

git remote add origin https://MYUSERNAME@bitbucket.org/MYUSERNAME/test.git

I used:

git remote add origin https://MYUSERNAME:PASSWORD@bitbucket.org/MYUSERNAME/test.git
Eidan Spiegel
  • 307
  • 1
  • 2
  • 10
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.

guest
  • 432
  • 3
  • 8
2

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://MYUSERNAME@bitbucket.org/MYUSERNAME/test.git

git version 1.9.5

Gabriela Gabriel
  • 504
  • 4
  • 10
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

1

I had the same problem. Installing Git 1.9.0 solved it for me.

Brad
  • 311
  • 1
  • 4
  • 12
0

I solved it by adding my ssh key to the repository and using the ssh url

Pascalius
  • 14,024
  • 4
  • 40
  • 38
0

If you experience this issue using GitExtensions then this might help you:

GitExt -> Tools -> Settings -> SSH -> Configure Git credential helper -> Suggest

That populated the command field with:

!"C:\Program Files (x86)\GitExtensions\GitCredentialWinStore\git-credential-winstore.exe"
ketan
  • 19,129
  • 42
  • 60
  • 98