【发布时间】:2018-02-16 11:36:24
【问题描述】:
我在多台计算机上工作,我会确保 git 在我推送时不会存储我的密码。所以简而言之,我希望 git 总是询问我的 github 密码。
这可能吗?
我比在 Mac 上感到沮丧,由于某种原因,它总是将我的密码存储在钥匙串中,我每次都必须手动删除它。
我正在使用命令行。
编辑:
这个答案给了我解决问题的线索:
How do I disable git's credential helper for a single repository?
在终端运行这个:
git config --local credential.helper ''
或者,您可以编辑 .git/config 文件并拥有以下内容:
[credential]
helper = ''
我没有 root 密码(出于某种原因,管理员密码不是有效的 root 密码,请看一下)。
【问题讨论】: