git htts切换到ssl协议

https 协议对占用服务器资源比较多 决定将 git htts切换到ssl协议

查看当前协议

$ git remote -v
origin  https://baidu.com/foreground/htjminiapp.git (fetch)
origin  https://baidu.com/foreground/htjminiapp.git (push)

查看当前协议是https

执行https 切换到ssl 协议

git remote set-url origin [email protected]:foreground/htjminiapp.git

查看当前协议

$ git remote -v
origin  [email protected]:foreground/htjminiapp.git (fetch)
origin  [email protected]:foreground/htjminiapp.git (push)

查看当前协议是ssl 协议

结果:切换成功
注意:git remote set-url origin https://baidu.com/foreground/htjminiapp.git 可以直接将ssl 切换回https

你可能感兴趣的:(git)