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

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

xjtudll1年前 (2024-12-29)技术心得2540

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://xjtudll.cn/Exp/698/

标签: NAS
分享给朋友:

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

Excel引用单元格地址的方法

单元格本身有两种表示方式: 1、列用字母,行用数字 例如:A1表示第一行第一列,A2表示第二行第一列 2、R表示行,C表示列 例如:R1C1就表示1行1列,R5C8就表示第5行第8列。 Excel单元格地址引用有两大方式:相对引用和绝对引用。 (1) 对于第一种单元格表示方式(A1) 其相对引用和绝...

解决IIS 不能下载.exe.config文件的方法

解决IIS 不能下载.exe.config文件的方法

  问题: 做了一个winform自动升级功能,通过http协议下载更新,发现每次得到的config文件字节都是0 原因: config文件默认不能通过浏览器下载。 分析及解决办法: Config文件是web的配置文件,默认是不允许下载的,就算在MIME中配置“applicat...

模数转换器主要技术指标

分辨率(Resolution) 指数字量变化一个最小量时模拟信号的变化量, 定义为满刻度与2n的比值。分辨率又称精度,通常以数字信号的位数来表示。 转换速率(Conversion Rate) 指完成一次从模拟转换到数字的AD转换所需的时间的倒数。 积分型AD的转换时间是毫秒级属低速AD,逐次...

穆斯林朝拜方向计算Qibla Direction

穆斯林朝拜方向计算Qibla Direction

穆斯林礼拜都是朝向麦加的“克尔白”(Kaaba)。在中国,大家都知道是向西。但是,很多人并不清楚到底是向“正”西,还是向朝西的某个角度。精确的方向该如何计算?这个问题就等同于:已知两地(其中一地是麦加)的经度,纬度,如何求方位角。学术的讲法就是大地主题...

安卓弹出Dialog之后,点触摸屏幕任意区域,Dialog消失了的解决方法

参考资料: http://blog.csdn.net/liushuiwen101423/article/details/46412487 http://blog.csdn.net/u012255016/article/details/49888881 http://blog.csdn.net/jds...

Keil MDK 查看局部变量提示<not in scope>

Keil MDK 查看局部变量提示

现象: 在进行STM32开发的时候出现了,调试代码,添加变量Watch时,显示not in scope。 处理方式: 因为代码开了优化的处理,把优化改到Level0,就可以解决问题。...

发表评论

访客

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