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

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

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

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

金蝶K3能正常登录,点击任何功能都卡死未响应

重启一下打印服务即可。 【原因】 一般是由于该电脑上的print spooler服务正在运行中导致; 【操作步骤】 可在电脑桌面上找到左下角【开始】→【控制面板】→【管理工具】,再打开【服务】图标,在所有的服务中找到print spooler这个服务,然后右键选择“停...

51串口通信

51串口通信

大学的时候,练习串口通信整的东东图太大,显示不正常。请直接看原图。upload/2010/1/201001291823133003.jpg演示如图: 左边的单片机:发送  查询方式右边的单片机:接收    中断方式K1:LED1亮;K2:LED2亮;...

php Undefined index和Undefined variable的解决方法

参考资料:http://www.jb51.net/article/13974.htm 问题: 上传一个PHP网站到服务器,提示: PHP Notice: Undefined index: user in C:\inetpub\wwwroot\xonixwatch.com\manager\index....

未能加载文件或程序集“file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports

首先我使用工具的信息为:Visual Studio 2010 ,水晶报表的版本为:13.0.0.99。 我想做的就是:使用VS2010中的WPF,将DataSet中的数据展示出来。(DataSet中的数据来自Oracle数据库) 但是我在运行的时候出现了这个问题: 未能加载文件或程序集“...

Excel引用单元格地址的方法

单元格本身有两种表示方式: 1、列用字母,行用数字 例如:A1表示第一行第一列,A2表示第二行第一列 2、R表示行,C表示列 例如:R1C1就表示1行1列,R5C8就表示第5行第8列。 Excel单元格地址引用有两大方式:相对引用和绝对引用。 (1) 对于第一种单元格表示方式(A1) 其相对引用和绝...

TM87系列单片机使用及注意事项

TM87系列单片机使用及注意事项

一、宏的使用 1、.define 可使用在任意地方,但.EQU只能在RAM区和常数区使用。 2、宏调用时,前面必须有空格。否则提示:DUPLICATE LABEL。如图所示。   二、LCD的使用 1、首先,Mask Option里面,LCD要是启用的。不然折腾半天也是瞎折腾。设置Mas...

发表评论

访客

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