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

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

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

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

金蝶 报废/补料是否会参与倒冲领料

金蝶 报废/补料是否会参与倒冲领料

产品入库倒冲领料单没有考虑报废补料数量,一般领料时则会考虑。此种情况可以通专过【报废倒冲领属料】的功能生成【生产领料单】。 请按下列方法步骤操作: 1、登录K/3主控台,依次单击【生产管理】→【生产任务管理】→【生产物料报废/补料】,双击【生产物料报废/补料单-维护】; 2、打开...

C#里面如何判断一个Object是否是某种类型

第一种方法 var isA = oldObject.GetType() == typeof(Dictionary<string, string>) 第二种方法 var isB = oldObject.GetType().FullName.IndexOf("Dictionary&...

RDLC报表:不同的页眉

RDLC报表:不同的页眉

问题描述: RDLC报表,需要首页页眉和后面的页面页眉不同 解决办法: 利用Hidden属性和内置字段PageNumber。适当隐藏某些元素。 则可实现不同的页眉。 例如:某个元素仅第一页显示 参考资料: https://forums.asp.net/t/2031340.aspx?having+...

谈谈BLE连接参数

在使用BLE过程中,BLE连接参数是一个比较容易忽略的地方,很多人从来不管这些连接参数,结果很容易出现以下几个问题: 1、设备功耗大; 2、与android系统手机或ios系统手机无法连接(尤其是ios系统); 3、连接后,串口使用较低波特率发送数据时,容易出现乱码; 这些问题...

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

Keil MDK 查看局部变量提示

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

QQ for Mac老提示密码错误

这段时间,一直在折腾黑苹果,好不容易将黑苹果装的差不多了,下了个QQ for Mac,安装什么的都很顺利,但是就是死活登陆不上。 1、检查过大小写,确认过密码,没错。在Windows下可以使用;在Mac系统中,Web QQ也可使用。 2、采用复制粘贴的方法将密码粘贴到密码框,依旧提示密码错误。...

发表评论

访客

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