我们在使用git初始化一个项目时,尤其是通过git submodule update --init --remote初始化子模块时,可能会遇到下面这个错误:

fatal: unable to access 'https://myserver.com/gogs/user1/myapp/': SSL certificate problem: unable to get local issuer certificate

  这是由于当你通过HTTPS访问Git远程仓库的时候,如果服务器上的SSL证书未经过第三方机构认证,git就会报错。原因是因为未知的没有签署过的证书意味着可能存在很大的风险。解决办法就是通过下面的命令将git中的sslverify关掉:

git config --global http.sslverify false

  上面这行命令的影响范围是系统当前用户,如果要设置为全局所有用户,可以改成这样:

git config --system http.sslverify false

  如果只是想针对当前仓库进行设置,可以在需要修改的仓库目录下执行:

git config http.sslverify false

  如果你的仓库中存在嵌套的git子模块(就是子模块中又引用了子模块),在进行初始化时,仍然有可能遇到self signed certificate in certificate chain的错误,此时可以通过执行下面的命令来解决:

npm config set strict-ssl false

  对于npm而言,除了可以在package.json的scripts属性中自定义脚本外,npm-scripts也内置了一些脚本,用来在特定的时机执行某些特定的任务,具体可以参照npm的官方文档https://docs.npmjs.com/misc/scripts

git中的SSL certificate problem: unable to get local issuer certificate错误的解决办法的更多相关文章

  1. 使用git克隆仓库到本地报错:SSL certificate problem: unable to get local issuer certificate

    第一次使用Git工具克隆仓库,使用的是HTTPS链接,失败了.发现是因为通过HTTPS访问时,如果服务器上的SSL证书未经过第三方机构认证,Git就会报错. 解决方法:通过命令关闭验证 git con ...

  2. 【error】git clone: SSL certificate problem: unable to get local issuer certificate

    报错: $ git clone https://github.XXX.git Cloning into 'XXX'... fatal: unable to access 'https://github ...

  3. Git错误:unable to access 'https://git.voicegu.com/qa/qa.git/': SSL certificate problem: unable to get local issuer certificate

    fatal: unable to access 'https://git.voicegu.com/qa/qa.git/': SSL certificate problem: unable to get ...

  4. SSL certificate problem unable to get local issuer certificate解决办法

    SSL certificate problem unable to get local issuer certificate 解决办法: 下载:ca-bundle.crt 将它放在自己的wamp或者x ...

  5. SSL certificate problem: unable to get local issuer certificate 的解决方法

    今天在进行微信开发获取微信Access_Token时,使用到了php的curl库, 在敲完代码后获取token失败,经过各种排查错误,到了下面这一步 SSL certificate problem: ...

  6. curl: (60) SSL certificate problem: unable to get local issuer certificate 错误

    今天同事做微信管理的项目,请求接口返回如下错误SSL certificate problem: unable to get local issuer certificate. 此问题的出现是由于没有配 ...

  7. cURL error 60: SSL certificate problem: unable to get local issuer certificate 解决方法

    微信开发的时,请求接口报错如下: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see ...

  8. HTTP 599: SSL certificate problem: unable to get local issuer certificate错误

    自己在用 PySpider 框架爬虫运行代码后时出现 HTTP 599: SSL certificate problem: unable to get local issuer certificate ...

  9. curl: (60) SSL certificate problem: unable to get local issuer certificate

    国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html 内部邀请码:C8E245J (不写邀请码,没有现金送) 国 ...

随机推荐

  1. Fortran文件读写--查找内容

    program ex implicit none character(len=) A(),B(),C() !A异常.B已开挖.C需标记 integer i,j,N1,N2,count !N1是10号文 ...

  2. gganimate|创建可视化动图,让你的图表会说话

    本文首发于“生信补给站”公众号,https://mp.weixin.qq.com/s/kKQ2670FBiDqVCMuLBL9NQ 更多关于R语言,ggplot2绘图,生信分析的内容,敬请关注小号. ...

  3. Chapter 07-Basic statistics(Part4 t-tests&&nonparametric tests of group difference)

    一. t-tests 这一部分我们使用分布在MASS包中的UScrime数据集.它是关于美国47个州在1960年时,关于惩罚制度对犯罪率的影响. Prob:监禁(坐牢)的概率: U1:14到24岁的城 ...

  4. 在Spring Boot中添加全局异常捕捉提示

    在一个项目中的异常我们我们都会统一进行处理的,那么如何进行统一进行处理呢? 全局异常捕捉: 新建一个类GlobalDefaultExceptionHandler, 在class注解上@Controll ...

  5. 解决Connection to Xxx@localhost failed.

    解决: Connection to jianshu@localhost failed. [08001] Could not create connection to database server. ...

  6. 【SpringSecurityOAuth2】源码分析@EnableOAuth2Sso在Spring Security OAuth2 SSO单点登录场景下的作用

    目录 一.从Spring Security OAuth2官方文档了解@EnableOAuth2Sso作用 二.源码分析@EnableOAuth2Sso作用 @EnableOAuth2Client OA ...

  7. oracle创建jobs定时任务报错:ora-01008:not all variables bound

    原脚本(直接从jobs拖出生成的DDL): begin  sys.dbms_job.submit(job => :job,                      what => 'xx ...

  8. eNSP 简介及基础操作

    eNSP 一. eNSP简介 eNSP是一款由华为自主研发的.免费的.可扩展的.图形化操作的网络仿真工具平台,主要对企业网络路由器.交换机及相关物理设备进行软件仿真,支持大型网络模拟.界面如下: 界面 ...

  9. springboot-整合多数据源配置

    简介 主要介绍两种整合方式,分别是 springboot+mybatis 使用分包方式整合,和 springboot+druid+mybatisplus 使用注解方式整合. 一.表结构 在本地新建两个 ...

  10. iOS导出远程推送所需要的P12 或pem文件

    http://www.saitjr.com/ios/ios-export-remote-notification-p12-pem-file.html iOS导出远程推送所需要的P12 或pem文件 h ...