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

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

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

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

Quartus II 中管脚上拉电阻(弱上拉)的设置方法

Quartus II 中管脚上拉电阻(弱上拉)的设置方法

参考资料: http://blog.sina.com.cn/s/blog_706f04d20100oelx.html 由于系统需求,需要在管脚的内部加上上拉电阻,目的是为了有个固定的初始状态。 以Quartus II 11.0为例,具体过程如下: 1、在菜单Assignments 中选择Assig...

OKI单片机——ML610Q4XX系统时钟切换

OKI单片机——ML610Q4XX系统时钟切换

系统时钟可以选择: 32K 低速时钟 32K×2 低速时钟 2M 高速时钟1/1,1/2,1/4,1/8分频 500K 高速时钟1/1,1/2,1/4,1/8分频 可以选择时钟输出 P20输出LSCLK (32.768K); P21输出2M高速时钟1/1,1/2,1/4,1/8分频或5...

ios:autolayout下如何获取UIView的实际宽度

参考资料: http://stackoverflow.com/questions/27653247/how-to-get-real-size-uiview-with-autolayout 问题: 在storyboard里放了一个UIView,并使用autolayout来约束其宽度。为了获取其实际宽度...

Windows Server 2012 发布RemoteApp程序

Windows Server 2012 发布RemoteApp程序

https://blog.51cto.com/vic366/924410 打开管理器管理器仪表板,选择本地服务器->远程桌面服务 选择集合->QuickSessionCollection->任务->发布RemoteApp程序 选择要发布程序的程序 如果程序不在列表中,可以...

SQL Server数据库脱机时间太长(脱机联机)

解决办法:强制脱机语句:ALTER DATABASE <dbname> SET OFFLINE WITH ROLLBACK IMMEDIATE联机语句ALTER DATABASE <dbname> SET ONLINE...

Proteus 7.6破解后依旧无法使用解决办法

Proteus7.6 SP4使用完美破解补丁1.1后(详情见http://www.xjtudll.cn/Exp/44/),以前能正常使用,近期发现无法使用,一点空白处,元件就消失了。 网上有人说破解是到2010.3.7就失效了。 我下载了sexywp大牛的“解决pwi退出问题.rar&r...

发表评论

访客

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