Git 忽略存储在 .git-credentials 中的凭据
Git ignores credentials stored in .git-credentials
我有两个托管在同一台服务器上的本地存储库,并且我已配置 Git 通过以下命令将我的凭据存储在 .git-credentials 文件中。
git config credential.helper store
但是,fetch/pull/push 不输入凭据只能在一个存储库中工作。在另一个存储库中,Git 总是要求提供凭据并忽略 .git-credentials 文件。
我的问题已经解决了。我的配置命令缺少全局选项。没有这个选项,我只为一个存储库配置了它。
正确的命令应该是:
git config --global credential.helper store
我有两个托管在同一台服务器上的本地存储库,并且我已配置 Git 通过以下命令将我的凭据存储在 .git-credentials 文件中。
git config credential.helper store
但是,fetch/pull/push 不输入凭据只能在一个存储库中工作。在另一个存储库中,Git 总是要求提供凭据并忽略 .git-credentials 文件。
我的问题已经解决了。我的配置命令缺少全局选项。没有这个选项,我只为一个存储库配置了它。
正确的命令应该是:
git config --global credential.helper store