使用git 更新代码 如何修改git 的密码一直令人费解,百度一堆也没给出答案。下面给一种替代方案。

例如:我们正常的代码地址 http://172.16.210.112/project/test.git

我使用过程中就一直报远程的代码库地址不存在,我把地址拷贝到浏览器打开,同我的账户登陆可以访问到。查看权限也有提交代码的权限。

解决办法:在地址前加上用户名:密码  再次更新成功。

                  http://username:password@172.16.210.112/project/test.git

                 在username password 处换成你自己的用户名,密码就可以了。

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

git查看当前的登录账户信息   git config --list

git设置账户名和邮箱

git config --global user.name [username]
git config --global user.email [email]

git重置登录信息 git config --system --unset credential.helper

 

相关文章:

  • 2021-04-09
  • 2021-12-25
  • 2021-09-28
  • 2021-07-11
  • 2021-09-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-23
  • 2021-05-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案