【发布时间】:2020-01-08 16:06:20
【问题描述】:
所以,这就是我们正在尝试做的事情:
$ git config --global credential.helper store
$ git config --global user.name myname
$ git config --global user.password mypassword
$ tmpdir=`mktemp -d`
$ cd $tmpdir
$ git init
$ git remote add origin <https github URL ending in .git>
$ git pull
$ git pull 运行时,系统会再次提示我输入用户名和密码。我的理解是,一旦我全局设置了用户名和密码,git 不应该自动接受吗?我需要将这些步骤作为自动化功能的一部分运行,并且在 https git url(或通过 tha 提示符)中明确提供用户名和密码将无济于事。
如何进行设置,这样我就不必一直手动提供凭据?
【问题讨论】: