当前位置:首页 > 技术心得 > 正文内容

黑群晖:certificate has expired or is not yet valid

xjtudll2年前 (2024-12-29)技术心得10180

https://blog.csdn.net/weixin_54655073/article/details/138663733

  1. sudo -i

  2. mv /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt.bak

  3. sudo curl -Lko /etc/ssl/certs/ca-certificates.crt https://curl.se/ca/cacert.pem

  4. synoservice --restart pkgctl-Docker (重启docker,如果卡住,就重启设备)

 

https://alexnj.com/blog/updating-root-certificates-on-synology/

Updating CA root certificate bundle on Synology

I ran into the issue of my Synology NAS not being able to pull from my local Docker registry:

docker: Error response from daemon: Get "https://redacted-local-hostname.net/v2/": x509: certificate has expired or is not yet valid

Turns out my Synology hasn't been picking up the latest CA root certificates. I could verify that this is the issue by running curl

curl -I https://alexnj.com  
curl: (60) SSL certificate problem: certificate has expired  
More details here: https://curl.haxx.se/docs/sslcerts.html  
...

Fixing this turned out rather easy. The commands below download the up-to-date root certificates from curl.se, in PEM format. We move it to the place where Synology keeps the CA-certificate bundle, overwriting it. We create a backup of the origin CA-certificate bundle, with a .backup extension, just in case you'd want to revert for any reason.

cp /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt.backup  
wget --no-check-certificate https://curl.se/ca/cacert.pem  
mv cacert.pem /etc/ssl/certs/ca-certificates.crt

After this, the same curl command started succeeding. However, Docker was still throwing the same error — meaning it didn't pick up the updated root certificates. Solution? Let's try restarting the Synology Docker daemon:

synoservice --restart pkgctl-Docker

That took care of it. If you run into the same issue with your Synology, hope this helps!

扫描二维码推送至手机访问。

版权声明:本文由鸟的天空发布,如需转载请注明出处。

本文链接:http://www.xjtudll.cn/Exp/698/

标签: NAS
分享给朋友:

“黑群晖:certificate has expired or is not yet valid” 的相关文章

Windows 2008 Server R2增量备份

Windows 2008 Server R2增量备份

Windows 2008 server R2在默认情况下都是完整备份,如果这么搞的话,空间很快就不够用了。 其实windows 2008 r2是有增量备份功能的,只不过这个功能隐藏的太深了。 Windows Server Backup -> 配置性能设置 -> 优化备份性能 ->...

Doxygen-利用graphviz生成及添加函数关系调用图

Doxygen-利用graphviz生成及添加函数关系调用图

准备工作:安装graphviz。 参考文献:http://hi.baidu.com/rdray/item/7b39b14830ba6c08c116131a 基本配置就不讲了,与生成Html文件类似。请参考:http://www.xjtudll.cn/Exp/243/ 1、Expert->Dot...

群晖安装OnlyOffice

群晖安装OnlyOffice

1、拉取镜像ssh  admin@201.201.201.168cd /volume1/dockersudo docker pull onlyoffice/documentserver 2、安装onlyoffice,注意配置端口本地端口与已用的不冲突即可 3、关闭密钥否则每次都提...

电子元件E系列及R系列规格

电子元件E系列及R系列规格

由于工厂商品化生产的需要,电阻电容电感等电抗元件产品的规格是按一种特定数列提供的,考虑到技术上和经济上的合理性,目前主要采用E数列作为电抗元件规格。 E数列通项公式: 当E取不同数值时,计算所得数值四舍五入取近似值,形成数值系列。目前主要有E6,E12,E24,E48,E96,E192。对于...

Altium检查遗漏的封装

Altium检查遗漏的封装

画完原理图后,当然就要检查封装是否填写以及填写是否正确。虽然用Compile能够找到封装的问题,但是Compile之后的message不仅仅包含封装的错误,还包括其他,看起来不甚直观,操作也不是很方便。以前在用Protel99SE的时候,可以通过导出电子表格的方式来检查封装是否正确。高版本的Alti...

水晶报表字符串字体大小根据字数调整

在实际应用中,可能需要根据字数多少来调整字体的大小。简单介绍一个方法。          选择要设置的字段,右键->设置对象格式->字体->大小,单击右边的x+2进入公式工作室,输入如下代码: if L...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。