无法再通过https推送到Bitbucket:git返回致命错误

Jab*_*ath 12 git bitbucket

我最近重新安装了Windows并获得了最新版本的git.我在Bitbucket上创建了一个新的回购并运行

git remote add origin https://MYUSERNAME@bitbucket.org/MYUSERNAME/test.git
Run Code Online (Sandbox Code Playgroud)

然后我跑了

git push -u origin --all
Run Code Online (Sandbox Code Playgroud)

但这给了我错误

fatal: could not read Password for 'https://MYUSERNAME@bitbucket.org': No such
file or directory
Run Code Online (Sandbox Code Playgroud)

在我得到一个提示问我的用户名和密码之前,推送工作正常.我已经尝试恢复到Git 1.7.11,但这没有做任何事情.

Eid*_*gel 15

我通过在网址中添加密码解决了这个问题.

代替:

git remote add origin https://MYUSERNAME@bitbucket.org/MYUSERNAME/test.git
Run Code Online (Sandbox Code Playgroud)

我用了:

git remote add origin https://MYUSERNAME:PASSWORD@bitbucket.org/MYUSERNAME/test.git
Run Code Online (Sandbox Code Playgroud)


Leo*_*lla 1

我所做的是将协议从 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