menu Chancel's blog
rss_feed
Chancel's blog
秋雨一何碧,山色倚晴空。

Git忽略证书错误

作者:Chancel Yang, 时间:2021 Nov 19, 阅读:60

git拉取仓库时提示证书错误

➜ git clone https://domain.com/chancel/gmcc.git
Cloning into 'gmcc'...
fatal: unable to access 'https://domain.com/chancel/gmcc.git/': Problem with the SSL CA cert (path? access rights?)

这种是由于https证书私签导致的,我们需要忽略证书错误才能正常拉取

➜ env GIT_SSL_NO_VERIFY=true git clone https://domain.com/chancel/gmcc.git

为了避免每次拉取此项目代码都需要忽略证书错误,进入仓库目录直接设置仓库忽略证书错误

➜ cd gmcc
➜ git config http.sslVerify false

当然也可以设置全局忽略git证书错误的问题(有一定安全风险)

➜ git config --global http.sslVerify false

[[replyMessage== null?"发表评论":"发表评论 @ " + replyMessage.m_author]]

account_circle
email
web_asset
textsms

评论列表([[messageResponse.total]])

还没有可以显示的留言...
[[messageItem.m_author]] [[messageItem.m_author]]
[[messageItem.create_time]]
[[getEnviron(messageItem.m_environ)]]
[[subMessage.m_author]] [[subMessage.m_author]] @ [[subMessage.parent_message.m_author]] [[subMessage.parent_message.m_author]]
[[subMessage.create_time]]
[[getEnviron(messageItem.m_environ)]]