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

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

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

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

浅析电波表——德国DCF码

浅析电波表——德国DCF码

参考文献:   http://en.wikipedia.org/wiki/DCF77 http://www.ptb.de/en/publikationen/news/html/news032/artikel/03207.htm http://www.ptb.de/cms/index.php...

大胆假设,小心求证

今天,捣鼓利尔达心电DEMO仪,主要是为了验证自己写的心率处理程序是否正确。结果,怎么捣鼓电压都不正常。用锂电池通过一个3V的LDO给系统供电。供电前,测试LDO输出电压正常,3.04V,结果一接上电路板,电压立马被拉至2V,有时甚至1.5V。从现象来看,首先怀疑的是DEMO板存在短路现象,电流过大...

UltraEdit复制粘贴十六进制(二进制)

UltraEdit复制粘贴十六进制(二进制)

问题: 用UltraEdit打开文件,看其十六进制,需要将十六进制数据复制出来并粘贴到记事本。但是直接复制(或Ctrl+C),无法粘贴到记事本。 原因: 复制到剪贴板的是二进制码流,而不是文本,所以无法贴到只能处理文本的记事本里。 解决办法: 选中要复制的区域,右键--->【十六进制复制所选视...

运放主要参数

集成运放的参数较多,其中主要参数分为直流指标和交流指标。 其中主要直流指标有输入失调电压、输入失调电压的温度漂移(简称输入失调电压温漂)、输入偏置电流、输入失调电流、输入偏置电流的温度漂移(简称输入失调电流温漂)、差模开环直流电压增益、共模抑制比、电源电压抑制比、输出峰-峰值电压、最大共模输入电压...

浅析电波表——英国MSF码

浅析电波表——英国MSF码

参考文献: http://en.wikipedia.org/wiki/Time_from_NPL http://www.npl.co.uk/science-technology/time-frequency/time/products-and-services/msf-radio-time-sig...

BLE 128位UUID规定及使用

BLE 128位UUID规定及使用

参考资料: http://www.deyisupport.com/question_answer/wireless_connectivity/f/45/t/30862.aspx 问题: 私有profile必须要用128位的UUID? 答案: 16bit UUID是SIG定义的,私有profile需...

发表评论

访客

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