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

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

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

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

Allegro测量距离如何同时显示mil和mm双单位

Allegro测量距离如何同时显示mil和mm双单位

点击Setup菜单→User Preferences...(用户参数设置) 打开下面的对话框,选择Display→Element(元素)→show measure_altunits(显示测量所有档位)选项卡选择millimeters。 然后测量后显示的距离效果如下图所示...

金蝶K3设置套打ActiveX 部件不能创建对象

金蝶K3设置套打ActiveX 部件不能创建对象

处理方式: 打开CMD命令提示符,执行以下命令注册加载该程序集即可解决。 C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe "C:\Program Files (x86)\Kingdee\K3ERP\K3Exc...

3DMax9注册机激活:REQUEST CODE ERROR!

在安装3Dmax9的时候,使用了安装包自带的注册机,但是每次算序列号时,都提示REQUEST CODE ERROR!。换了几个版本的安装包,都是这个现象。 网上仔细搜索了一番,找到了原因。正确的破解步骤如下: 1、把3dmax 9注册机拷贝到3dmax 9的安装目录下(不要启动3dmax 9)...

用宏定义代替printf函数

问题 有时候我们想用宏定义来决定是编译debug版本的代码还是release的代码,dubug版本的代码会通过printf打印调试信息,release版本的代码则不会。我们总不能对每一条printf都这样写: #if _DEBUG_printf("hello world!");...

“CrystalDecisions.ReportSource.ReportSourceFactory”的类型初始值设定项引发异常

“CrystalDecisions.ReportSource.ReportSourceFactory”的类型初始值设定项引发异常

VS2010 System.TypeInitializationException: “CrystalDecisions.ReportSource.ReportSourceFactory”的类型初始值设定项引发异常。 System.TypeInitializationExce...

NPOI导出Excel表 如何实现短日期格式

https://q.cnblogs.com/q/43888/ 问题: 因为导出EXCEL 档日期格式永远都是 2012-11-22 14:51:11 ,而我们希望结果永远只是 2012-11-22, 我修改完的代码如下: case "System.DateTime": //...

发表评论

访客

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