##github URL ssh和http相互切换
场景:我从github上clone资源的时候,使用的是http,但是后来想要改成ssh。
######方法一:使用 git remote set-url [本地分支] [url] 来进行更改。
eg:
1、查看当前地址
$ git remote -v
origin https://github.com/lyuxiaomin/dubbo.git (fetch)
origin https://github.com/lyuxiaomin/dubbo.git (push)
2、修改地址
$ git remote set-url origin git@github.com:lyuxiaomin/dubbo.git
3、查看修改后地址
$ git remote -v
origin git@github.com:lyuxiaomin/dubbo.git (fetch)
origin git@github.com:lyuxiaomin/dubbo.git (push)
######方法二:修改 .git/conf 文件,如下图: