我们在使用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. Asp.Net Core下使用swagger生成api文档

    目录 一.前期准备 二.配置Swagger 三.参考 .Net Core中有两个集成NSwag的包,分别为Swashbuckle和NSwag.两者的配置大同小异.这里以NSwag为例. 一.前期准备 ...

  2. Caused by: java.util.zip.ZipException: zip file is empty

    1.问题描述:mybranch分支代码和master分支的代码一模一样,mybranch代码部署到服务器上没有任何问题,而master代码部署到服务器上运行不起来. 2.解决办法: (1)登陆服务器启 ...

  3. 阿里架构师花近十年时间整理出来的Java核心知识pdf(Java岗)

    由于细节内容实在太多啦,所以只把部分知识点截图出来粗略的介绍,每个小节点里面都有更细化的内容! 整理了一份Java核心知识点.覆盖了JVM.锁.并发.Java反射.Spring原理.微服务.Zooke ...

  4. Django4模型(操作数据库)

    模型入门同步数据库的两个指令创建模型注意事项1.外键ForeignKey 模型入门 同步数据库的两个指令 python manage.py makemigrations python manage.p ...

  5. hospital:广西大学生计算机设计大赛

    html 当时做到的就是这些了 <!DOCTYPE html><html lang="en"><head> <title>病人信息查 ...

  6. redis数据类型--zset

    数据结构: zset是有序的,不运行重复的,带有分值score的 数据结构对比: 操作命令: zadd myzset 10 java 20 python 20 ruby 40 mysql 50 php ...

  7. 什么是渐进式框架 (vue.js)

    渐进式意味着你可以将 vue 作为你项目的一部分嵌入其中,带来更丰富的交互体验

  8. luogu P1327 数列排序

    题目描述 给定一个数列{an},这个数列满足ai≠aj(i≠j),现在要求你把这个数列从小到大排序,每次允许你交换其中任意一对数,请问最少需要几次交换? 输入格式 第一行,正整数n (n<=10 ...

  9. CodeChef FAVNUM FavouriteNumbers(AC自动机+数位dp+二分答案)

    All submissions for this problem are available. Chef likes numbers and number theory, we all know th ...

  10. LightOj-1027 A Dangerous Maze(期望)

    You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. Th ...