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

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

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

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

C#将图片白色背景设置为透明

红色部分是关键 Image image = System.Drawing.Image.FromFile(@"C:\A.JPG"); Bitmap pbitmap = new Bitmap(image); pbitmap.MakeTransparent(Color.White);...

K3 BOS 单据添加审核日期

K3 BOS 单据添加审核日期

https://blog.csdn.net/sz_bdqn/article/details/7291350   可能会出现如下问题:   多级审核流程界面的"业务审核日期"只有选项"不需要" 回到原单据,点击审核日期,将其属性锁定,全...

金蝶 KFO.Dictionary 怎么写

.Net 调用,以C#为例,调用如下: 1、添加kfo.dll的引用。 2、调用方法 KFO.Dictionary dct=new KFO.Dictionary(); dct.let_value("FInteID",100);...

线反转法行列键盘扫描

线反转法行列键盘扫描

    行列键盘的学习是单片机学习的必经之路,可是对于初学者来说学习起来并不容易。书上的资料不多,或是说明不细,亦或太复杂不易理解。而线反转法行列键盘扫描简单易懂,非常适合初学者学习,也可作为程序开发之用。    了解行...

太阳能板发电原理

太阳表面温度高达摄氏6000度,内部不断进行核聚变反应,并且以辐射方式向宇宙空间发射出巨大能量。人类有三个途径利用太阳能:光热转换、光电转换及光化转换。 光热转换即靠集热器把太阳能收集,可应用于将水加热,或在寒带地区的冬季,设计太阳能暖房让人抵抗低温。太阳能暖房系统由太阳能收集器、热储存装置、...

Altium Drag妙用——批量添加引脚(PIN)延长导线

Altium Drag妙用——批量添加引脚(PIN)延长导线

使用Altium画单片机相关的原理图的时候,因为要对单片机的引脚添加网表(Netlist),所以必然会用导线将PIN延长,然后加网表。要达到的效果如图所示: 最笨的办法就是:一根线一根线画。这样的话效率很低,典型的浪费时间。有没有更高效的办法呢?答案是肯定的,这就是我标题里提到的Drag的功效。...

发表评论

访客

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