form1.cn
Make a little progress every day

gitlab项目迁移后更换新的地址与用户名密码

14th of April 2021 Linux GIT 1681

不用重新Git clone,直接在旧的项目终端输入以下命令,本地代码的地址就会变成新代码的地址

git remote set-url origin http://zhangjian@123.56.239.25:89/cpp/cppobject.git

格式:git remote set-url origin http://用户名@新GIT地址


更换新的GIT密码:输入以下命令之后你在push就会提示输入名称和密码

git config --system --unset credential.helper



长期存储密码:输入以下命令之后你只需要输入一次密码后在次push就不需要输入了

git config --global credential.helper store