在升级letsencrypt时,提示“https://raw.githubusercontent.com/certbot/certbot/v1.9.0/letsencrypt-auto-source/letsencrypt-auto”连接超时,直觉是国内无法访问了,然后上网搜了下,果然不止我出现这问题,后来找到解决之法。
两步解决,重新获得免费证书!
第1步
打开网站 https://www.ipaddress.com/,在里面输入raw.githubusercontent.com,获得域名对应的ip。
第2步
在服务器的hosts文件中添加ip和域名的映射关系。
在Linux中
1 2 3 4 5 6 7 |
// 编辑hosts文件 sudo vim /etc/hosts // 在hosts中添加查到的ip和域名,比如我查到的是151.101.76.133 199.232.68.133 raw.githubusercontent.com // 保存退出即可 |
在Windows中
1 2 3 4 5 6 |
编辑 C:/Windows/System32/hosts 文件 添加查到的ip和域名 199.232.68.133 raw.githubusercontent.com 保存退出,可能要重启。 |
做完这2步,就能继续正常更新SSL证书了。