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

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

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

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

XCode 模拟器完整分辨率截屏

XCode 模拟器完整分辨率截屏

选中模拟器 window-->去掉Show Device Bezels的勾选 -->Zoom 然后cmd + s 保存...

如何判断一个正整数是不是2的幂

估计用递归的方法大家都知道,就不赘述了 这里使用一个更简单的方法。 若一个正整数是2的幂,则这个数在计算中的表示肯定是以下形式:0x00...1000...B省略号表示若干个0.问题就转变为一个等价的命题:如何判断给定的一个正整数是如0x00...1000...B这种形式(二进制表示式中只有唯一...

模数转换器基本原理

模数转换器基本原理

模数转换一般分为采样、保持、量化和编码四步进行。 采样-保持 采样是将时间上连续变化的信号转换为时间上离散的信号,采样值取决于采样时间内输入模拟信号的大小。 根据采样定理,其采样频率fS必须大于等于输入模拟信号包含的最高频率fmax的两倍。采样频率的一般选取为: 要对模拟信号的采样值进行...

android实现状态栏添加图标的函数

android实现状态栏添加图标的函数,具体如下: private void showNotification() { // 创建一个NotificationManager的引用 NotificationManager notificationManager = (NotificationM...

群晖Apache 忽略文件名大小写

群晖Apache 忽略文件名大小写

参考资料:https://www.cnblogs.com/shipment/p/14767848.html 1、SSH登录群晖ssh  admin@201.201.201.1682、修改conf文件权限为777sudo chmod 777 /volume1/@appstore/Apache...

常用电平标准

常用电平标准

现在常用的电平标准有TTL、CMOS、LVTTL、LVCMOS、ECL、PECL、LVPECL、RS232、RS485等,还有一些速度比较高的LVDS、GTL、PGTL、CML、HSTL、SSTL等。下面简单介绍一下各自的供电电源、电平标准以及使用注意事项。 1、TTL电平 TTL:Transi...

发表评论

访客

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