git submodule add 报错SSL certificate problem unable to get local issuer certificate

date
Nov 7, 2022
slug
2022-11-07
status
Published
tags
技术
Bug解决
summary
type
Post
在使用hugo并安装主题时遇到的错误SSL certificate problem: unable to get local issuer certificate
(base) PS E:\vscodeProject\chz8bit.github.io\quickstart> git submodule add https://github.com/nanxiaobei/hugo-paper themes/paperCloning into 'E:/vscodeProject/chz8bit.github.io/quickstart/themes/paper'...fatal: unable to access 'https://github.com/nanxiaobei/hugo-paper/': SSL certificate problem: unable to get local issuer certificatefatal: clone of 'https://github.com/nanxiaobei/hugo-paper' into submodule path 'E:/vscodeProject/chz8bit.github.io/quickstart/themes/paper' failed
通过以下链接,解决了这个问题
个人觉得主要是这行代码,有对应的解释 https://github.com/desktop/desktop/issues/9293#issuecomment-607357181
git config --global http.sslBackend schannel
最后运行成功
(base) PS E:\vscodeProject\chz8bit.github.io\quickstart> git submodule add https://github.com/nanxiaobei/hugo-paper themes/paperCloning into 'E:/vscodeProject/chz8bit.github.io/quickstart/themes/paper'...remote: Enumerating objects: 1594, done.remote: Counting objects: 100% (731/731), done.remote: Compressing objects: 100% (402/402), done.remote: Total 1594 (delta 361), reused 404 (delta 327), pack-reused 863 eceiving objects: 100% (1594/1594), 5.46 MiB | 445.00 KiB/sReceiving objects: 100% (1594/1594), 5.50 MiB | 368.00 KiB/s, done.Resolving deltas: 100% (750/750), done.starting fsmonitor-daemon in 'E:/vscodeProject/chz8bit.github.io/quickstart/themes/paper'

© chz8bit 2018 - 2024