申请准备
需要准备一个 [Google Cloud Platform](云计算服务 | Google Cloud) 的账号
Google Cloud Project ID,可以通过 [https://console.cloud.google.com/apis/dashboard](API 和服务 – API 和服务 – My First Project – Google Cloud Console) 得到
[scode type="lblue"]启用API[/scode]
https://console.cloud.google.com/apis/library/publicca.googleapis.com?project=上方ID
[scode type="lblue"]第一次点击启用[/scode]
[scode type="lblue"]完成后点击激活[/scode]
[scode type="yellow"]输入下方命令[/scode]
gcloud beta publicca external-account-keys create
[scode type="lblue"] 弹出授权点击允许 [/scode]
Created an external account key
[b64MacKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
keyId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
EAB 密钥使用一次后自动失效;如果没有使用,7 天后也会自动失效。使用 EAB 密钥注册的 ACME 帐户没有过期时间(对证书续期没有影响)。
开始申请
然后运行
acme.sh
注册 ACME 账户acme.sh --register-account --server google -m "你的邮箱" --eab-kid "你的EAB key(keyId)" --eab-hmac-key "你的HMAC(b64MacKey)"
[scode type="red"]然后就直接用 acme.sh
签发证书,选择 Server 为 Googlev[/scode]
acme.sh --set-default-ca --server google #切换默认 CA 为 Google
[scode type="green"]申请完事
这里用的dnspod api[/scode]
acme.sh --issue --dns dns_dp -d tx.sb -d *.tx.sb