如何在git bash中更改我的凭据?

时间:2016-09-29 16:15:51

标签: git bash credentials

我需要从主机更改用户名和密码。 当我使用$ git config --global credential.helper default时,它应该在我下次使用repo时询问新用户和密码,但它不起作用。

热门更改我的用户名和密码?

2 个答案:

答案 0 :(得分:0)

确保您使用ssh url作为repo而不是https,然后尝试运行:

git config --global user.name myusername git config --global user.email myemail

答案 1 :(得分:0)

我在这里遇到了同样的问题,并在git docs中找到了解决方案。写下以下几行,一切都会好起来,适合您下一次的交流。

$ git config credential.helper store
$ git push http://example.com/repo.git
  Username: <type your username>
  Password: <type your password>

这是文档的链接:git scm