GIT更换连接方式

zhangxing 2020-06-16

1-使用 git remote -v 查看对应的克隆地址:

git remote -v
origin  https://github.com/username/repository.git (fetch)
origin  https://github.com/username/repository.git (push)

可以看到确实是以https方式clone的


2-删除并重新添加:

git remote rm origin
git remote add origin :username/repository.git

3-push一下

git push -u origin master

相关推荐