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

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

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

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” 的相关文章

win7怎样彻底删除打印机驱动

win7怎样彻底删除打印机驱动

https://zhidao.baidu.com/question/1802002455667765027.html 1、开始---设备和打印机:随便选择一个打印机图标,选择打印机服务器属性; 2、单击打印服务器属性---驱动程序---删除,选择删除驱动程序和驱动程序包,点确定; 3、无法删除...

计划状态的mrp计划订单,不需要了如何手工关闭?

审核状态的计划订单才能手工关闭,建议审核以后进行关闭...

BLE 128位UUID规定及使用

BLE 128位UUID规定及使用

参考资料: http://www.deyisupport.com/question_answer/wireless_connectivity/f/45/t/30862.aspx 问题: 私有profile必须要用128位的UUID? 答案: 16bit UUID是SIG定义的,私有profile需...

C# 将程序添加开机启动的三种方式

原文:https://blog.csdn.net/arrowzz/article/details/69808761 前言 最近在研究程序随系统启动,发现在 win7 上因为权限的问题,写注册表的时候总是会出现问题,写不进去导致的不能自动启动,随后决定仔细的看一看这方面的问题。 查资料过程中主要发现有...

ios宏: 判断是否是retina屏,是否iPad,设备判断(4,5,5s,6等)

#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) #define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) #def...

Xcode查找函数(方法)调用及被调用

Xcode查找函数(方法)调用及被调用

参考资料:http://stackoverflow.com/questions/7145045/find-method-references-in-xcode 这个功能有的说是 Find Caller,有的说是Find references,有的说是Find Usages 直白的讲,就是我需要知道这...

发表评论

访客

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