menu Chancel's blog
rss_feed
Chancel's blog
有善始者实繁,能克终者盖寡。

Git忽略证书错误

作者:Chancel Yang, 创建:2021-11-19, 字数:522, 已阅:70, 最后更新:2021-11-19

这篇文章更新于 861 天前,文中部分信息可能失效,请自行甄别无效内容。

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

Bash
➜ 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证书私签导致的,我们需要忽略证书错误才能正常拉取

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

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

Bash
cd gmcc
➜ git config http.sslVerify false

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

Bash
➜ 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)]]