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

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

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

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

如何释放由RingtoneManage实例化的MediaPlayer

参考资料:http://stackoverflow.com/questions/15450255/how-to-release-the-mediaplayer-instantiated-by-ringtonemanager 为了获取android铃声的名称,使用了以下代码 //根据铃声地址获取铃声的...

如何使用Dell PowerEdge RAID控制器(PERC)初始化和创建虚拟磁盘/阵列

如何使用Dell PowerEdge RAID控制器(PERC)初始化和创建虚拟磁盘/阵列

本文介绍了使用PowerEdge RAID控制器(PERC)的Dell Bios实用程序创建和初始化虚拟阵列或虚拟磁盘(VD)的步骤。 注意:下面的说明适用于以下PowerEdge RAID控制器(PERC):5(i+e)、6(i+e)、H700、H800、H310、H710、H810、 H330、...

DFC逻辑调频

DFC逻辑调频

2035机芯有个技术指标:DFC。如下图所示。 DFC,全称Digital Frequency Control,即逻辑调频。 我们知道,在所有的电子产品指标中,频率尤为重要,要想获得比较稳定的振荡,最广泛的就是使用石英振子,包括在手机和电脑里都有,石英手表更是如此,它用石英晶体的振荡来做时基,故...

Proteus error:

Proteus error:"probe object xxx is ambigously placed"

Proteus仿真时,在添加电流探针以后,提示error "probe object xxx is ambigously placed" 如图所示: 原因: 电流探针仿真的时候那个电流的符号要和导线的方向一致 出现问题就是因为这个 解决办法: 改变电流探针方向,使之与导线方向...

把存储过程结果集插入临时表

--使用sp_helpserver 显示可用的服务器。  exec sp_helpserver  --打开服务器的"data access"属性  exec sp_serveroption '服务器名',...

ios 获取应用程序的名称和版本号

.wiz-todo, .wiz-todo-img {width: 16px; height: 16px; cursor: default; padding: 0 10px 0 2px; vertical-align: -10%;-webkit-user-select: none;} .wiz-to...

发表评论

访客

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