问题描述
我想自动在 GitExtension 中使用推拉功能,而不必每次都在提示中输入用户名和密码。
I want to use a push and pull automatically in GitExtension, without entering my user and password in a prompt, every time.
那么如何在GIT中保存我的凭据?
So how can I save my credentials in GIT?
推荐答案
运行
git config --global credential.helper store
然后
git pull
提供用户名和密码,以后将记住这些详细信息。凭据存储在磁盘上的文件中,磁盘权限为仅用户可读/可写,但仍为纯文本。
provide a username and password and those details will then be remembered later. The credentials are stored in a file on the disk, with the disk permissions of "just user readable/writable" but still in plaintext.
如果要更改密码稍后
git pull
将失败,因为密码不正确,然后git从〜/ .git-credentials
文件中删除有问题的用户+密码,因此现在重新运行
Will fail, because the password is incorrect, git then removes the offending user+password from the ~/.git-credentials
file, so now re-run
git pull
提供新密码,以便它可以更早地工作。
to provide a new password so it works as earlier.
这篇关于如何在GIT [GitExtension]中保存用户名和密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!