0


git更换远程仓库和用户名密码

第一步:GIT命令更换远程仓库和用户名密码

查看仓库地址

git remote  -v

修改仓库地址

git remote set-url origin  "你的新远程仓库地址"   

没有的话 新增仓库地址

git remote add origin "你的新远程仓库地址"  

查看用户名

git config user.name

修改用户名

git config --global user.name "新的用户名"

查看密码

git config user.password

修改密码

git config --global user.password "新的密码"

查看邮箱

git config user.email

修改邮箱

git config --global user.email "新的邮箱"

增加ssh密钥

ssh-keygen -t rsa -C "[email protected]"

查看ssh密钥

cat ~/.ssh/id_rsa.pub

更换远程仓库地址 可以通过IDEA 插件

  1. 选择git的Manage Remotes

  1. 填入分支 和 新的远程仓库地址

第二步 控制面板 添加普通凭据

选择添加普通凭证

填入网络地址【git新仓库地址】

添加对应的用户名和密码

ps : 如果是第三方仓库 要将你的公钥填入对应的SSH权限 然后 把.git文件忽略掉 重新提交即可

记录一下自己花时间的更换git新仓库的地址 如有更好的方法 请各位大佬推荐!!!

标签: git github

本文转载自: https://blog.csdn.net/m0_49197105/article/details/129536666
版权归原作者 volume_bao 所有, 如有侵权,请联系我们删除。

“git更换远程仓库和用户名密码”的评论:

还没有评论