Skip to content
This repository has been archived by the owner on Aug 22, 2021. It is now read-only.

使用的是Ubuntu 20.04LTS,还是会申请失败,从前老的脚本没问题 #71

Closed
iSteveyang opened this issue Nov 24, 2020 · 7 comments

Comments

@iSteveyang
Copy link

iSteveyang commented Nov 24, 2020

今天更新的版本已经优化证书申请流程,现在应该不会再申请失败了。

如果想用自己的证书,待脚本成功申请证书后,再将 /etc/ssl/v2ray/key.pem/etc/ssl/v2ray/fullchain.pem 换成自己的证书并停用 acme.sh 自动 renew 即可。停用自动 renew 的指令如下:

~/.acme.sh/acme.sh --remove -d example.com --ecc

之后版本会加入事先指定证书的功能,只要存在证书档案就不会进行申请。

Originally posted by @phlinhng in #67 (comment)

@iSteveyang
Copy link
Author

iSteveyang commented Nov 24, 2020

bash <(curl -sL https://raw.githubusercontent.com/phlinhng/v2ray-tcp-tls-web/master/install.sh) && v2script
这个老的就没问题,用现在这个不行,

Issuing certificate
It seems that you are using sudo, please read this link first:
https://github.com/acmesh-official/acme.sh/wiki/sudo
Installing certificate
It seems that you are using sudo, please read this link first:
https://github.com/acmesh-official/acme.sh/wiki/sudo
Issuing certificate
It seems that you are using sudo, please read this link first:
https://github.com/acmesh-official/acme.sh/wiki/sudo
Installing certificate
It seems that you are using sudo, please read this link first:
https://github.com/acmesh-official/acme.sh/wiki/sudo
证书签发失败, 请运行修复证书

之后我用certbot申请成功了Let's Encrypt的证书,但是替换之后让他继续安装是个问题

@phlinhng
Copy link
Owner

phlinhng commented Nov 25, 2020

這個報錯很明確了,因為你正在使用 sudo 運行 acme.sh(我猜是 GCP 的機器),去除 acme.sh 的 sudo 要求應該可以解決。(2b99b40)

申請證書是在組件都安裝完後才進行的,如果你要替換證書,只要將公鑰和私鑰放到 /etc/ssl/v2ray/fullchain.pem/etc/ssl/v2ray/key.pem 後重新啟動 v2ray.service 即可,不需要重新安裝了。

@iSteveyang
Copy link
Author

這個報錯很明確了,因為你正在使用 sudo 運行 acme.sh(我猜是 GCP 的機器),去除 acme.sh 的 sudo 要求應該可以解決。(2b99b40)

申請證書是在組件都安裝完後才進行的,如果你要替換證書,只要將公鑰和私鑰放到 /etc/ssl/v2ray/fullchain.pem/etc/ssl/v2ray/key.pem 後重新啟動 v2ray.service 即可,不需要重新安裝了。

您好,想请教您一下,我是aws的机器,并不是root用户也不是sudo,那这是什么情况呢?

@phlinhng
Copy link
Owner

phlinhng commented Nov 25, 2020

@iSteveyang 是這個腳本的特性,偵測到非 root 用戶時會自動嘗試 sudo。就算你沒加 sudo,腳本也會自動加上,確保安裝過程不會遇到權限問題。

@iSteveyang
Copy link
Author

@phlinhng 好的谢谢您,这个问题能避免吗?还是在acme.sh它提示错误后,我必须通过自己手动替换证书重启服务才可以正常使用?

@phlinhng
Copy link
Owner

@iSteveyang 我己經修複這個 bug 了(所以才關閉 issue),詳情請見我上面的答覆。

@iSteveyang
Copy link
Author

@phlinhng 十分感谢,是我没注意,谢谢解答

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants