使用Acme.sh申请Google SSL证书(手动DNS解析)

手动DNS解析申请,自动DNS解析在第7步开始改成自动的就行。

1.登录google账号后,点击链接:https://console.cloud.google.com/apis/library/publicca.googleapis.com?project=temporal-genius-1919810

点击启用。

2.等待启用后,单击右上角的“激活 Cloud Shell”,打开 Google Cloud Shell。

3.在Cloud Shell输入

[prism lang=""]gcloud beta publicca external-account-keys create[/prism]

稍后会返回keyid和b64mackey

[prism lang=""]Created an external account key
[b64MacKey: xxxxxxxxxxxxxxxxxxx
keyId: xxxxxxxxxxxx][/prism]

 

4.安装Acme.sh(已安装的跳过这步)

[prism lang=""]curl https://get.acme.sh | sh -s email=你的邮箱[/prism]

Acme.sh安装在根目录下,安装在哪都行。

[prism lang=""]~/.acme.sh/[/prism]

 

5.Acme.sh默认生成Let’s Encrypt R3证书,我们需要修改一下让它默认生成google证书。

[prism lang=""]./acme.sh --set-default-ca --server google[/prism]

 

6.获取申请google证书的资格

[prism lang=""]./acme.sh --register-account -m 刚刚申请key的谷歌账号邮箱[url=home.php?mod=space&uid=32917]@Google.com[/url] --server google 
--eab-kid xxxxxx 
--eab-hmac-key xxxxxxxx[/prism]

 

7.申请google证书(手动DNS解析,自动的参考官方教程)推荐申请ECC证书

申请常规证书

[prism lang=""]./acme.sh --issue --dns -d 域名 -d 域名 
--yes-I-know-dns-manual-mode-enough-go-ahead-please[/prism]

 

会弹出两个TXT记录,解析它就行
稍等一会,重新激活申请订单。

[prism lang=""]./acme.sh --server google --renew -d 域名 -d 域名 
--yes-I-know-dns-manual-mode-enough-go-ahead-please[/prism]

 

申请ECC证书

[prism lang=""]./acme.sh -k ec-256 --issue -d 域名 -d 域名 
--yes-I-know-dns-manual-mode-enough-go-ahead-please[/prism]

 

会弹出两个TXT记录,解析它就行
解析完成后

[prism lang=""]./acme.sh -k ec-256 --server google --renew -d 域名 -d 域名 
--yes-I-know-dns-manual-mode-enough-go-ahead-please[/prism]
阅读剩余
THE END