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

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

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

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

BL51: WARNING L13 (RECURSIVE CALL TO SEGMENT) WITH CONSTANTS 解决

问题描述:   将函数名存储在table里,通过函数指针的方式调用函数。 编译提示: BL51: WARNING L13 (RECURSIVE CALL TO SEGMENT) WITH CONSTANTS 使用环境: C51 Version 7.00 代码例程(使用Keil官方资料来说...

基于状态机实现的按键处理算法

基于状态机实现的按键处理算法

这篇文章写了很久了,一直没发,现在发出来吧。 关于按键的基础知识,这里就不多写了,可以参考程序匠人的《按键漫谈》 一次完整的击键过程包括:等待阶段,闭合抖动阶段,有效闭合阶段,释放抖动阶段,有效释放阶段。释放抖动阶段对于按键处理用处不大,所以这个阶段被忽略了,即按键击键包括四个状态:等待阶段,闭合抖...

k3 API 如何修改token的有效期

解决方案: Token有效期的修改(FValue的单位为秒): UPDATE t_SystemProfile set FValue= '86400' --有效时间 where FCategory= 'API' AND FKey= 'tokenvalidity'...

深刻认识差模电压和共模电压

原文作者:佚名 文章来源:http://blog.csdn.net/ywf861029/archive/2009/10/05/4633775.aspx 我们需要的是整个有意义的“输入信号”,要把两个输入端看作“整体”。 就像初中时平面坐标需要用 x,y 两个数表示,而到了高中或大学就只要用...

利用Doxygen生成CHM文件

利用Doxygen生成CHM文件

准备工作:安装HTML Help Workshop。微软官网有安装包提供。 基本配置就不讲了,与生成Html文件类似。请参考:http://xjtudll.cn/Exp/243/ 下面讲特殊配置。 1、Wizard->Output HTML->prepare for compressed...

windows xp系统添加凭据操作方法

windows xp系统添加凭据操作方法

Windows XP操作系统中打开“运行”,输入“ control keymgr.dll”回车,即可打开“存储用户名和密码”窗口,单击“高级”选项卡,然后单击“管理密码”,添加服务器的IP地址、用户和密码,确认退出后,重启电脑。...

发表评论

访客

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