git remote set-url $url命令修改remote URL
-
查看当前的地址
xxxxxx@xxxxxx:~/workspace/goal$ git remote -v origin git@github.com:xxxxxx/SpringBoot.git (fetch) origin git@github.com:xxxxxx/SpringBoot.git (push) -
使用git remote set-url命令从SSH到HTTPS的远程URL
xxxxxx@xxxxxx:~/workspace/goal$ git remote set-url origin https://github.com/xxxxxx/SpringBoot.git -
验证是否改变成功
xxxxxx@xxxxxx:~/workspace/goal$ git remote -v origin https://github.com:xxxxxx/SpringBoot.git (fetch) origin https://github.com:xxxxxx/SpringBoot.git (push)
本文介绍了如何使用`git remote set-url`命令将Git远程仓库的URL从SSH更改为HTTPS。首先,通过`git remote -v`查看当前的远程URL,然后执行`git remote set-url origin https://github.com/xxxxxx/SpringBoot.git`进行切换,最后再次验证`git remote -v`确认更改已生效。
4957

被折叠的 条评论
为什么被折叠?



