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

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

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

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://www.xjtudll.cn/Exp/698/

标签: NAS
分享给朋友:

“黑群晖:certificate has expired or is not yet valid” 的相关文章

Android x86 4.4 RC2卡在跳过Wifi后面一步

Android x86 4.4 RC2卡在跳过Wifi后面一步

问题:Android x86 4.4 RC2卡在跳过Wifi后面一步,没法跳过,一直死循环。 无论怎么改都在这步了, 返回了也不知道从哪可以跳过。   解决办法: 一、在语言选择界面用鼠标在 左上-右上-右下-左下 四个角各点一遍 这个方法不知道是谁试出来的,这么扯蛋的办法都能想到。 二...

Source Insight删除半个汉字问题

Source Insight删除半个汉字问题

Source Insight(汉化版)下载地址: http://www.onlinedown.net/soft/32292.htm 解压后,文件夹“搞定SourceInsight的半个汉字的问题”,我们需要的是文件SuperBackspace.em。 软件(宏)自带的使用说明...

C# WinForm带参数运行 如:1.exe -a

建立好了项目文件后,需要修改的地方有两点! 1:修改 Program 类中的Main方法 加上入口点,并且将参数传递到Form1窗体 2:修改 Form1窗体的构造函数,允许传参。 下面是代码: Program.cs代码如下: namespace ParameterApp {   ...

CC2541功耗测试结果

CC2541功耗测试结果

测试环境: 1、CC2541开发板 2、使用heartrate工程,修改心率发送间隔时间为1秒(原来是2秒) 测试结果: 慢速广播 10 uA 快速广播 2 mA 仅定时器运行:1.2 uA(蓝牙关闭) 休眠:0.34 uA 与手机连接时刻:1 mA 约持续10秒 保持连接状态(1秒发送一次心率值...

Storyboard已关联下面的TableView,为什么TabView的Cell显示不出来

问题: Storyboard已关联下面的TableView,为什么TabView的Cell显示不出来 原因及解决办法: 很简单,你的代码没有设置,SB里面的TableViewController要关联一个类,你需要添加好,并且注意下面这两个代理方法的返回值 - (NSInteger)numberO...

ML610Q473 程序烧录

ML610Q473 程序烧录

仿真器能够仿真程序的运行,但毕竟是“仿”,与实际情况可能有些出入,因此最终还是要将程序烧录到实际的目标板中。 对于ML610Q473,大体要有这么几步: (1) uEase与目标板连接 (2) 生成Hex文件 (3)转换Hex文件供烧录 1、uEase与目标板连接 (1)...

发表评论

访客

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