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

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

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

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

Quartus Error: Signal "XX" drives an input pin”

问题: Quartus II编译提示:“Error: Signal "B" drives an input pin” 原因: 不该相连的节点(或PIN)连接到了一起了,有可能是被自动连接上了,删除不需要的连接即可。 还有种情况是:导线的名称跟Input...

如何通过程序清除蓝牙缓存的设备名称?

http://stackoverflow.com/questions/10793761/how-to-programmatically-clear-the-bluetooth-name-cache-in-android 现象: 一个已经配对过的蓝牙设备,修改名称之后,手机上显示的依旧是以前的名称,并...

iPad2插电循环重启,无法充电

老爷机iPad2最近发疯了: 1、不插充电器 无法开机; 2、插上普通充电器,木有反应; 3、插上专用的5V,2.1A充电器,有时可开机,但一会儿就关机了。然后又自动开机。循环往复。 经过分析,初步确定是电池有问题(机子本身无进水无维修) 可以参考下面的讨论: https://discussions...

利用Multisim设计数字滤波器

利用Multisim设计数字滤波器

【工具】->【Circuit Wizards】->【Filter Wizard】  可以设计低通,高通,带通,带阻,滤波器可以选是无源还是有源。不过这玩意儿还是没专业的滤波器设计软件好用。...

远程桌面事件ID20499,没有明显的问题

问题:收到ID为20499的TerminalServices-RemoteConnectionManager警告事件,错误是:对于用户管理员来说,远程桌面服务花费的时间太长,无法从服务器\ server.domain.home加载用户配置。但是,找不到任何问题解决办法:在注册表编辑器中,找到并单击以...

MEMS微电子机械系统

文章来源:http://www.memschina.com MEMS(Micro Electromechanical System,即微电子机械系统)是指集微型传感器、执行器以及信号处理和控制电路、接口电路、通信和电源于一体的微型机电系统。概括起来,MEMS具有以下几个基本特点,微型化、智能化、多...

发表评论

访客

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