git切换地址
git remote set-url origin https://xxx.xxx.xxx/xxx/xxx.git
切换完之后查看地址
git remote -v
有时候本地git
仓库在从http
切换到https
后,还是使用http
去pull/push/clone
时会提示
SSL certificate problem: unable to get local issuer certificate
这里git
给出的提示已经很明显了,就是说缺少本地证书
方法一
那么我们先从对应的https
的网站上把证书下载到本地
在详细信息里选择复制到文件
选择Base64
存到本地
然后本地git设置证书即可
git config --global http.sslCAinfo D:/work/xxx.cer
方法二
简单粗暴,直接不进行ssl
验证
git config --global http.sslVerify false
类似CApath: none问题解决
先
git config --global --edit
或
git config --system --edit
看看路径对不对,不对的话改过来,然后:wq
保存
接着
git pull
试试,如果提示CApath: none
那么接着
git config -l
或者一个个看
git config --global -l
git config --system -l
查看当前所有的配置,查看是否有配置sslCAInfo
项配置错误,然后改过来就ok了