参考:
https://github.com/acmesh-official/acme.sh
https://github.com/acmesh-official/acme.sh/wiki/Google-Trust-Services-CA
https://cloud.google.com/public-certificate-authority/docs/quickstart
1、申请Google的EAB key and EAB id:
登录云平台Shell Cloud Shell
登录谷歌账号之后出现如下界面
初始化账户:
gcloud init #选择1重置当前账户配置 gcloud projects create zy5447 gcloud config set project zy5447 gcloud projects add-iam-policy-binding zy5447 --member=user:544725571@qq.com --role=roles/publicca.externalAccountKeyCreator #这里的544725571@qq.com是我谷歌账户的名称 |
返回如下
请求 EAB 密钥 ID 和 HMAC,运行以下命令:
gcloud publicca external-account-keys create |
弹出提示授权按钮,点击授权
返回如下
此命令会返回在公共 CA 的生产环境中有效的 EAB 密钥。在响应正文中,keyId
字段包含 EAB 密钥 ID,b64MacKey
字段包含 EAB HMAC。
您必须在获取 EAB 密钥后的 7 天内使用它。如果您不在 7 天内使用 EAB 密钥,则该密钥会失效。使用 EAB Secret 注册的 ACME 帐号没有有效期。
安装acme
curl https://get.acme.sh | sh -s email=544725571@qq.com |