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

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

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

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

远程桌面登录没有许可证解决方案(强行跳过)

远程桌面登录没有许可证解决方案(强行跳过)

在远程连接时有时会出现没有提供许可证、远程会话已断开问题。 这时通过命令行   mstsc /v: ip /admin  即可进行连接 ip为远程桌面ip。 举例:mstsc /v: 201.201.201.66 /admin...

vs2010删除臃肿的ipch和sdf文件

vs2010删除臃肿的ipch和sdf文件

VS2010建立C++解决方案时,会生成一个sdf文件和ipch文件夹,这两个文件再加上*.pch等文件使得工程变得非常的庞大,一个简单的程序都会占用几十M的硬盘容量。 解决方法: Tools->Options->Text Editor->C/C++->Advanced(高...

OSX:如何移动NSWindow而同时不移动其子Window

参考资料: http://stackoverflow.com/questions/7657132/how-to-move-an-nswindow-without-moving-child-nswindows 问题: 应用程序有个主window,在主window里,新建了一个子window。 每当移动...

金蝶 从旧账套拷贝供应链单据的自定义字段到全新帐套

金蝶 从旧账套拷贝供应链单据的自定义字段到全新帐套

补充几点:1、K3的官方的工具(K3单据自定义字段复制工具),要求在官方服务期,否则工具直接报错 2、涉及的表应该有以下几个:GLNoteCitationGLNoteTypeICChatBillTitleICClassTableInfoICClassTableInfoLayoutICTemplate...

IOS Autolayout ScrollView无法滚动的解决办法

参考资料: http://www.cocoachina.com/bbs/read.php?tid=175749 问题: 设定autolayout之后,发现scrollview无法滚动了,导致无法查看所有的内容。在viewDidLoad里重新设定scrollview的contentSize,还是不行。...

固定水晶报表每页显示的行数两种方法

方法一:   例如每页显示20条记录:    1.选择[区段专家]    2.选择[明细]    3.选择[在之前新增分页]的公式按钮,输入以下公司    IF   Remaind...

发表评论

访客

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