pantheon-systems / terminus-acme-plugin
此包已被弃用且不再维护。没有建议的替代包。
与ACME挑战交互的Terminus命令。
2.0.0
2022-03-08 20:02 UTC
This package is auto-updated.
Last update: 2024-09-18 14:13:01 UTC
README
与ACME域所有权验证挑战交互的Terminus命令。
您可以使用这些命令在Pantheon上上线之前为您的域名获取HTTPS证书。
配置
这些命令不需要配置。
用法
1. 获取ACME挑战以证明域名所有权
选择配置DNS TXT记录或从您现有的web服务器提供文件以证明您拥有该域名。
使用DNS TXT记录
terminus alpha:https:challenge:dns-txt <site>.<env> example.com
[notice] Create a DNS txt record containing:
_acme-challenge.example.com. 300 IN TXT "CHALLENGE_TEXT"
[notice] After this is complete, run terminus acme-txt-verify <site>.<env> example.com
此命令还支持--format
和--fields
选项,以帮助您使用Terminus自动化工作流程。
使用现有web服务器上的文件
terminus alpha:https:challenge:file <site>.<env> example.com
[notice] Wrote ACME challenge to file hult7KCSkUm1SpdaVlh28JhJ9f3J6U6Kv7H-QH3i-0Y
[notice] Please copy this file to your web server so that it will be served from the URL
[notice] http://example.com/.well-known/acme-challenge/hult7KCSkUm1SpdaVlh28JhJ9f3J6U6Kv7H-QH3i-0Y
[notice] After this is complete, run terminus acme-file-verify <site>.<env> example.com
您必须是站点的团队成员才能创建挑战。
2. 告知Pantheon挑战已准备好进行验证
在部署ACME挑战后,使用以下适当的命令告知Pantheon挑战已准备好进行验证。
使用DNS TXT记录
terminus acme-txt-verify <site>.<env> example.com
[notice] The challenge for example.com is being verified...
[notice] Ownership verification is complete!
[notice] Your HTTPS certificate will be deployed to Pantheon's Global CDN shortly.
使用现有web服务器上的文件
terminus alpha:https:challenge:file:verify <site>.<env> example.com
[notice] The challenge for example.com is being verified...
[notice] Ownership verification is complete!
[notice] Your HTTPS certificate will be deployed to Pantheon's Global CDN shortly.
对于使用此插件进行脚本自动化的用户请注意
- 验证命令在验证成功时退出码为0,出现错误时为非零值。
- 当发生验证错误时,有时需要提供新的挑战。
您的自动化应该调用命令再次获取挑战,并查看是否已更改。
安装
要安装此插件,请将其放置在~/.terminus/plugins/
中。
在Mac OS/Linux上
mkdir -p ~/.terminus/plugins
curl https://github.com/pantheon-systems/terminus-acme-plugin/archive/2.0.0-alpha1.tar.gz -L | tar -C ~/.terminus/plugins -xvz
帮助
运行terminus help alpha:https:challenge:dns-txt
获取帮助。