menu Chancel's Blog
rss_feed lightbulb_outline

Git忽略证书错误

类型:Git
创建时间:2021-11-19 11:55:37
更新时间:2021-11-19 14:05:58
类型:Git
更新时间:2021-11-19 14:05:58

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

评论列表([[messageList.data.items.length]])

[[messageItem.m_author]] [[messageItem.m_author]]
[[messageItem.create_time]]
[[messageItem.m_environ.browser]] [[messageItem.m_environ.os]] [[messageItem.m_environ.device]]
[[subMessage.m_author]] [[subMessage.m_author]] @ [[subMessage.parent_message.m_author]] [[subMessage.parent_message.m_author]]
[[subMessage.create_time]]
[[subMessage.m_environ.browser]] [[subMessage.m_environ.os]] [[subMessage.m_environ.device]]