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

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

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

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

使用Doxygen生成Html文档

使用Doxygen生成Html文档

Doxygen是一种开源跨平台的,以类似JavaDoc风格描述的文档系统,完全支持C、C++、Java、Objective-C和IDL语言,部分支持PHP、C#。注释的语法与Qt-Doc、KDoc和JavaDoc兼容。Doxgen可以从一套归档源文件开始,生成HTML格式的在线类浏览器,或离线的LA...

ios7与ios8 注册本地通知

// IOS8 新系统需要使用新的代码    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)     {     &...

C#让TextBox滚动条一直位于最下部

TextChanged事件 滚动条自动处于TextBox最下部需要在Form1类中加上下段代码:   private void txtReceiveMsgChanged(object sender, EventArgs e) {     //...

验证datatable是否被修改的问题

问题: 举个例子: 会员管理的修改  我先将会员详细信息存在一个datatable  User里面   然后 界面上的控件与该datatable一一绑定, 在用户保存的时候  验证该datatable是否被修改 来判断是否需要操作数据库 &...

C# textBox框实现输入下拉列表

C# textBox框实现输入下拉列表

textBox框像百度搜索出现下拉列表的样式,如图: 重点就是要关注:AutoCompleteMode和AutoCompleteSource两种属性。 具体实现代码如下: 将此方法在frmLogin_Load事件里加载, private void bindTxt() {   ...

运放运用中容易忽视的问题

本文收集于网络,原文作者:djyos。 在嵌入式设计中,数字部分的功能越来越强大,而模拟电路大有被边沿化的趋势,但不管怎样,传感器以及其调理电路,还是离不开模拟电路的,其中运放是不可或缺的模拟器件。 本文谈谈在设计运放电路中容易被设计人员疏忽的问题,不注意这些问题,可能导致你的电路看起来能够工作...

发表评论

访客

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