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

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

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

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

Android手机Google服务耗电过多

手机:三星I9000 操作系统:Android 2.3.3 (Lida ROM) 现象:电池使用时间很短,经常莫名其妙就没电了。查看电量消耗,60%(甚至更多)为“Google框架服务”占用。 病因: 通过网络搜索,发现是因为曾经禁止了“Google框架服务&rd...

IAR STM8 #pragma optimize 指令

IAR STM8 #pragma optimize 指令

参考资料:http://blog.csdn.net/niepangu/article/details/38066319 #pragma optimize= none  //one of none, low, medium, high, size, or speed放在被优化函数前 ...

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

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

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

金蝶 在任务单序时簿直观查看关键件领用套数解决方案

金蝶 在任务单序时簿直观查看关键件领用套数解决方案

目前生产任务单序时簿无法很直观地查看领料套数,而标准报表《任务单领料明细表》需每一种物料都要领料才能统计出领料套数但大部分情况下,非关键件物料采用倒冲领料或者集中领料,以致于该报表无法使用。 备注:已领套数=生产任务单对应投料单的分录行的[已领数量/单位用量的最小值,但是不包括计划投料数量是0的投...

c# toolstrip控件怎么把左边的几个小点去掉

c# toolstrip控件怎么把左边的几个小点去掉

c# toolstrip控件怎么把左边的几个小点去掉 小点如下图所示: 解决办法: 选中你的toolstrip 然后属性 属性中有个 GripStyle 设置Hidden...

Android 6.0:收不到BluetoothDevice.ACTION_FOUND广播

Android 6.0:收不到BluetoothDevice.ACTION_FOUND广播

参考资料: http://stackoverflow.com/questions/32656510/register-broadcast-receiver-dynamically-does-not-work-bluetoothdevice-action-f https://developer.and...

发表评论

访客

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