gitlab同步代码时https证书错误
来源:互联网 发布:怎么在淘宝买高仿手表 编辑:程序博客网 时间:2024/05/29 12:41
OS:Ubuntu 14.04
最近在用 repo从gitlab上同步代码,执行repo init总是会有报错:
curl: (60) SSL certificate problem: unable to get local issuer certificateMore details here: http://curl.haxx.se/docs/sslcerts.htmlcurl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option.If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL).If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.
正在自己挠头的时刻,忽然看到上面日志提到的url:http://curl.haxx.se/docs/sslcerts.html,抱着一试的心态,还真找到了我想要的证书使用方法,真是"众里寻他千百度,蓦然回首,那人却在,灯火阑珊处"。
这个链接里也提到了,证书是作为网站合法性验证的工具,应该是由于我的本地证书不完整,或者是已经过期,无法验证gitlab的合法性,所以需要有一个最新的证书文件。将cacert.pem下载到本地后,只要执行export CURL_CA_BUNDLE={cacert.pem文件路径},此时再去做repo init,就不再报证书的错误了。
repo sync时出现类似于:
curl: (22) The requested URL returned error: 401 Unauthorized这种401认证错误的问题,也可以用以上的方法解决。
参考:
SSL Certificate Verification
Linux使用curl访问https站点时报错汇总
curl: (60) SSL certificate problem: unable to get local issuer certificate
0 0
- gitlab同步代码时https证书错误
- Vista HTTPS 证书错误
- selenium测试https时安全证书认证失败的错误
- git push 到https时证书错误的解决方案
- git 到https时证书错误的解决方案
- 下载https 公匙证书java代码
- https自签名证书验证相关代码
- https的证书错误,错误码-1012问题及解决方案
- nginx配置https/证书更新/ Let's encrypt免费证书(https)以及错误解决!
- https 证书
- https证书
- https证书
- https 证书
- https证书
- GitLab 启用HTTPS
- GitLab配置HTTPS
- GitLab服务器启用https
- gitlab https访问不了
- PHP面向对象编程 面向对象的特殊实践
- hackinglab.cn脚本关之二
- SurfaceView和View的区别
- [Scrapy]模拟登陆并获取Cookie值
- 模态框缓冲效果实现
- gitlab同步代码时https证书错误
- Android编译过程详解
- 键盘事件模拟抽奖
- python数字图像处理(12):基本图形的绘制
- 线程池Executors.newFixedThreadPool
- atom 编辑器使用技巧之根据文件后缀名自动转换编码
- Android内存管理机制详解
- 凸包 【uva11168】 Airport
- C++中一个函数作为作为另一个函数的参数