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

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

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

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

ios宏: 判断是否是retina屏,是否iPad,设备判断(4,5,5s,6等)

#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) #define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) #def...

如何减小Multisim仿真文件大小

如何减小Multisim仿真文件大小

Multisim默认是保存仿真数据的,所以一旦仿真过,文件将会变得很大,几百kB是非常容易就达到了。这个异常不爽。 进行如下设置后,就只保存电路图了。 第一步: 第二步: 只要不勾选“保存仿真数据和仪器”即可。 另外还可以设置是否自动备份等等,看个人所好了。...

运放和比较器的区别及比较器技术参数

1、运放和比较器区别 (1)放大器与比较器的主要区别是闭环特性 放大器大都工作在闭环状态,所以要求闭环后不能自激。而比较器大都工作在开环状态更追求速度。对于频率比较低的情况放大器完全可以代替比较器(要注意输出电平),而比较器大部分情况不能当作放大器使用。 因为比较器为了提高速度进行优化,这种优化却减...

Protel99SE自动编号

Protel99SE自动编号

说到Protel99SE的自动编号,大家想到的肯定是Tools->Annotate,如图所示。 但是这种方法有个很大的缺点,虽然可以设置自动编号的方向,但是编号却不尽如人意。例如,我想让某一部分元件的编号是连续的,但是用此方法所得的编号很难保证连续。这样的话给绘制PCB的工作带来了很大麻...

NSString 字符串的合并

.wiz-todo, .wiz-todo-img {width: 16px; height: 16px; cursor: default; padding: 0 10px 0 2px; vertical-align: -10%;-webkit-user-select: none;} .wiz-t...

SQL中没有IIf,Nz函数,用什么替代

SQL Server中没有iif函数,可以使用case when then 例如: case when 性别 = '男' then '先生' else ‘女士' end SQL中也没Nz函数,可以用isnull代替 例如 isnull(字段,0)...

发表评论

访客

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