git切换ssh和http协议

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yimingsilence/article/details/79980070

切换协议:

1. 查看当前remote

git remote -v

2. 切换到http:

git remote set-url https://github.com/username/repository.git

3. 切换到ssh:

git remote set-url [email protected]:username/repository.git


也可以直接改当前git目录里面有个配置文件。

猜你喜欢

转载自blog.csdn.net/yimingsilence/article/details/79980070
今日推荐