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

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

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

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 II Warning:can't generate programming files because you are currently using the Quartus II softwore in Evaluation Node

开发环境: Quartus II 11.0 问题: 代码编译通过,但是下载到CPLD,没有任何现象 且有warning 如下: can't generate programming files because you are currently using the Quartus II softwo...

拉电流和灌电流

拉电流和灌电流

在使用数字集成电路时,拉电流输出和灌电流输出是一个很重要的概念。 例如在使用反向器作输出显示时,图1是拉电流,即当输出端为高电平时才符合发光二极管正向连接的要求,但这种拉电流输出对于反向器只能输出零点几毫安的电流用这种方法想驱动二极管发光是不合理的(因发光二极管正常工作电流为5~10mA)。...

按键精灵手机助手无法连接到手机调试

现象: 按键精灵手机助手无法连接到手机调试 手机已打开开发者选项,已选择USB调试   解决办法: 打开手机上的按键精灵,此时手机助手连上了……...

用Allegro导出DXF/DWG格式文件

用Allegro导出DXF/DWG格式文件

在硬件系统设计过程中,有时需要导出PCB文件的二维模型用以设计对应的结构件。 以下内容介绍的是采用Cadence套件中的Allegro软件将brd文件导出为DXF文件。1.在Allegro中打开brd文件,设置好要导出的layer,选择File->Export->DXF 2....

Coreldraw批量导出图片

Coreldraw批量导出图片

问题: 多个Coreldraw(cdr)文件,需要导出jpg或png图片文件,但不想通过打开每个文件来导出。如何批量导出jpg或png图片文件?   解决办法: 网上有人说,采用宏的方式,但这个需要自己编写宏,对菜鸟来说太难;还有人说,给Coreldraw安装一个插件,但根本不知道用什么插...

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

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

发表评论

访客

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