代码之家  ›  专栏  ›  技术社区  ›  Matt Ke Alex Santos

Git忽略存储在.Git凭据中的凭据

  •  0
  • Matt Ke Alex Santos  · 技术社区  · 6 年前

    我有两个本地存储库,它们托管在同一台服务器上,我配置了git,通过以下命令将我的凭证存储在.git凭证文件中。

    git config credential.helper store
    

    但是,不输入凭证的fetch/pull/push只在一个存储库中工作。在另一个存储库中,Git总是请求凭据并忽略.git凭据文件。

    1 回复  |  直到 6 年前
        1
  •  2
  •   Matt Ke Alex Santos    6 年前

    我已经解决了我的问题。我的配置命令缺少全局选项。如果没有这个选项,我只为一个存储库配置了它。

    正确的命令应该是:

    git config --global credential.helper store