Git 忽略 credential.helper 设置

Git 忽略 credential.helper 设置

几个月以来,每次我想从 GitHub 推送或拉取数据时,我都必须输入我的凭证。我尝试了几种不同的凭证助手,但都无一例外地失败了。

我相信我已经找到了原因的线索:

$ git config --add credential.helper fakecredentialhelper
$ git pull
输入密钥“/path/to/my/ssh_key”的密码:
已经更新。

根据文档,Git 接受任何值credential.helper并尝试运行该程序。但fakecredentialhelper不存在,这意味着 Git 应该得到这个结果:

$ git credential-fakecredentialhelper --file=/mnt/shared/creds 获取
git:“credential-fakecredentialhelper”不是 git 命令。请参阅“git --help”。

但调用git pull成功且没有任何问题,这意味着 Git 甚至没有尝试运行它。我正在输入我的凭证;为什么 Git 跳过了credential.helper

或者 Git 正在吞下错误?

Ubuntu 18.04.1 LTS
Git 2.17.1

相关内容