Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git忽略存储在.Git凭据中的凭据_Git_Credentials - Fatal编程技术网

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

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

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

git config credential.helper store

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

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

正确的命令应该是:

git config --global credential.helper store