Eve*_*ill 5 git version-control google-code
我是学生,并且是版本控制软件的新手,所以我很难弄清楚这一点。我正在使用Google代码Git存储库。要访问此存储库,我在Windows 7上使用Git Bash。问题在于,当我执行推送步骤时,没有提示我输入密码。例如:
首先,我像这样设置全局变量:
git config --global user.name "Your Name"
git config --global user.email youremail@gmail.com
Run Code Online (Sandbox Code Playgroud)
克隆的
$ git clone https://UserName@code.google.com/p/repository/
Run Code Online (Sandbox Code Playgroud)
然后我对文件进行了更改/添加了新文件等并添加了
$ git add .
Run Code Online (Sandbox Code Playgroud)
承诺的
$ git commit -m "Message"
Run Code Online (Sandbox Code Playgroud)
拉确保我是最新的
$ git pull
Already up-to-date.
Run Code Online (Sandbox Code Playgroud)
但是当我按下时,不会提示我输入密码
$ git push origin master
fatal: remote error: Invalid username/password.
You may need to use your generated googlecode.com password; see https://code.goo
gle.com/hosting/settings
Run Code Online (Sandbox Code Playgroud)
有什么建议么?谢谢。
对于非 machine.google.com 特有的类似问题,您可以尝试删除或更新 Windows 凭据管理器中保存的 git 密码。我的系统保存了我的旧密码:
信用:https : //github.com/Microsoft/Git-Credential-Manager-for-Windows/issues/141
编辑:看起来您无法通过将用户名放入 URL 来成功访问谷歌代码(至少截至 2011 年 8 月),请参阅:netrc not Accepted by git
也就是说,这可能有效:
摘自上面显示的 URL(您必须访问该网站):
对于 Git 存储库,您可以将以下行添加到 .netrc 文件中,记录您有权提交访问的每个存储库域的密码。确保您已设置 .netrc 的权限,以便只有您的用户帐户才能读取它。
机器码.google.com 登录 blah.blah@gmail.com 密码 mypasswordXXX123
一旦你有了上述项目,看起来在 Git Bash 中你应该能够像这样更新你的 _netrc 文件:
echo "machine code.google.com login blah.blah@gmail.com password mypasswordXXX123" > $HOME/_netrc
| 归档时间: |
|
| 查看次数: |
10601 次 |
| 最近记录: |