且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在git中保存用户名和密码

更新时间:2023-01-02 10:28:44

  git config credential.helper store 

然后

  git pull 

提供用户名和密码,并且稍后会记住这些详细信息。凭证存储在磁盘中,并具有磁盘权限。



如果您想稍后更改密码

  git config credential.helper store 

然后

  git pull 

提供新的密码,它将像以前一样工作。


I want to use a push and pull automatically in GitExtension, without entering my user and password in a prompt, every time.

So how can I save my credentials in git ?

git config credential.helper store

then

git pull

provide user-name and password and those details will be remembered later. The credentials are stored in the disk, with the disk permissions.

if you want to change password later

git config credential.helper store 

then

git pull

provide new password and it will work like before.