可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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.
回答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
回答2:
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
回答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.
回答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://MYUSERNAME@bitbucket.org/MYUSERNAME/test.git
git version 1.9.5
回答5:
I had the same problem. Installing Git 1.9.0 solved it for me.
回答6:
I solved it by adding my ssh key to the repository and using the ssh url
回答7:
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"