美文网首页
Git更新后需要输入用户名和密码问题

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

作者: 那月无痕 | 来源:发表于2023-08-02 10:44 被阅读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时,输入了用户名和密码后,就保存下来了,以后就不会再要求输入了。

相关文章

网友评论

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

      本文链接:https://www.haomeiwen.com/subject/kqxppdtx.html