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

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

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

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

NSButton——设定背景图片Scale

NSButton——设定背景图片Scale

参考资料: http://stackoverflow.com/questions/5851923/how-to-scale-axes-independently-at-runtime-on-an-nsbutton 代码方式: NSButton *someButton; NSButtonCell...

NSTableview从mutable array获取数据

参考资料: http://stackoverflow.com/questions/3397952/populating-nstableview-from-a-mutable-array 可以使用以下的方法 – numberOfRowsInTableView:...

Xcode Warning:No rule to process file xxx 解决

Xcode Warning:No rule to process file xxx 解决

在编译程序的时候,Xcode给出了警告:warning: no rule to process file '$(PROJECT_DIR)/xxx.h' of type sourcecode.c.h for architecture armv7。如图所示: 从warning中我们可以看出是某个.h...

Android MultiSelectListPreference, java.lang.String cannot be cast to java.util.Set

问题及现象: 尝试添加一个 MultiSelectListPreference到设置界面,MultiSelectListPreference基本代码如下: <MultiSelectListPreference android:title="@string/title" an...

iOS10,Xcode8上传AppStore的时候,找不到构建版本

iOS10,Xcode8上传AppStore的时候,找不到构建版本

参考资料:http://blog.csdn.net/u013283787/article/details/52593143 使用Xcode8成功上传app之后,在itunes connect 构建版本里根本找不到上传的版本。 网上搜了搜,又查了一下邮件    &nb...

Cool Edit Pro生成周期性方波

Cool Edit Pro生成周期性方波

工作中有时候要生成一些周期性方波,如下图所示: 利用Cool Edit Pro 2.0可以轻易的做到这一点,操作方法如下: 菜单栏:【生成】-> 【音调】 在弹出的窗口进行如下设置: (1) 勾选 【固定设置】 (2) 设定基础频率,调味特性,频率成分 A、基础频率:要生成的方波的频率 B、...

发表评论

访客

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