无法通过https推送到Bitbucket:git返回致命错误 [英] Cannot push to Bitbucket via https anymore: git returns fatal error
问题描述
$ g $ remote add origin https://MYUSERNAME@bitbucket.org/MYUSERNAME/test .git
然后我跑了
<$ p $然而,这给了我一个很好的解决方案。错误
致命:无法读取'https://MYUSERNAME@bitbucket.org'的密码:没有这样的
文件或目录
在我得到提示后询问我的用户名和密码,工作得很好。我已经尝试恢复到Git 1.7.11,但这并没有做任何事。
我所做的是更改协议从HTTPS到GIT。
按照说明在这里设置SSH: https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git
(从GitBash控制台轻松完成, 不需要安装SSH或任何东西 ,都带有Git)
完成SSH设置后,只需使用git @ bitbucket .... url重新添加远程设备即可。
希望这会有帮助。
我已经安装了Git 1.8.5.2-preview20131230
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.
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
这篇关于无法通过https推送到Bitbucket:git返回致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!