Git更新后需要输入用户名和密码问题

2023-08-02  本文已影响0人  那月无痕

出自https://blog.csdn.net/whereismatrix/article/details/126517683

问题描述

安装了新的git 2.39版本。然后每次pull, push都要求输入用户名和密码。

解决

解决方法是:保存一下用户本地凭证,这样每次git操作时,使用保存的凭证就好了。

全局的
git config --global credential.helper store
git config --global user.email "email"
git confgi --global user.name "name"

在多个项目,不同的git服务器,不同用户名时,对每个项目设置各自的local 配置。

local
git config --local credential.helper store
git config --local user.email "email"
git confgi --local user.name "name"

然后,再次pull,push时,输入了用户名和密码后,就保存下来了,以后就不会再要求输入了。

上一篇 下一篇

猜你喜欢

热点阅读