首页 > 其他分享 >Git——报错解决:git clone或git pull时 fatal:Peer‘s certificate issuer has been marked as not trusted by the

Git——报错解决:git clone或git pull时 fatal:Peer‘s certificate issuer has been marked as not trusted by the

时间:2022-12-08 15:06:01浏览次数:43  
标签:pull Git sslVerify clone git 报错 http

报错截图

fatal: unable to access ‘https://github.com/xxx/xxx.git/’: Peer’s certificate issuer has been marked as not trusted by the user.

Git——报错解决:git clone或git pull时 fatal:Peer‘s certificate issuer has been marked as not trusted by the_解决方法

报错原因

当你通过HTTPS访问Git远程仓库,如果服务器的SSL证书未经过第三方机构签署,那么Git就会报错。这是十分合理的设计,毕竟未知的没有签署过的证书意味着很大安全风险。

解决方法

1. Git clone报错

  • 在克隆远程仓库时,先用env命令设置GIT_SSL_NO_VERIFY环境变量为"ture",再调用正常的git clone命令:
export GIT_SSL_NO_VERIFY=true
git clone xxx
  • 在仓库路径下将http.sslVerify设置为"false"
git config http.sslVerify "false"  

2. Git pull报错

  • 只需要在仓库路径下将http.sslVerify设置为"false"即可:
git config http.sslVerify "false"  

Git——报错解决:git clone或git pull时 fatal:Peer‘s certificate issuer has been marked as not trusted by the_github_02

参考文章:

标签:pull,Git,sslVerify,clone,git,报错,http
From: https://blog.51cto.com/u_15906550/5921699

相关文章