【问题标题】:How to change my credentials in git bash?如何在 git bash 中更改我的凭据?
【发布时间】:2017-02-08 01:47:43
【问题描述】:

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

想更改我的用户名和密码?

【问题讨论】:

  • 请更清楚地定义“它不起作用”。

标签: git bash credentials


【解决方案1】:

确保你对 repo 使用 ssh url 而不是 https,然后尝试运行:

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

【讨论】:

    【解决方案2】:

    我在这里遇到了同样的问题,我在 git 文档中找到了解决方案。写下以下几行,一切都会好起来的,因为你的下一个commhrigit坐。

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

    这是文档的链接:git scm

    【讨论】:

      猜你喜欢
      • 2021-06-05
      • 2013-06-12
      • 2021-03-01
      • 2021-12-18
      • 2017-01-18
      • 2014-12-31
      • 2016-01-03
      • 2019-06-05
      • 1970-01-01
      相关资源
      最近更新 更多