acmesh-official / acme.sh

A pure Unix shell script implementing ACME client protocol
https://acme.sh
GNU General Public License v3.0
38.42k stars 4.89k forks source link

cloudxns api error #177

Closed Remonli closed 8 years ago

Remonli commented 8 years ago

Got error when I use cloudxns API,could you pls chk ?

user@chicago[14:25:52]:<~/.acme.sh>$./acme.sh --issue --dns dns-cx -d  mydomain.com --test
[Fri Apr 29 14:25:56 CST 2016] Using stage api:https://acme-staging.api.letsencrypt.org
[Fri Apr 29 14:26:00 CST 2016] Skip register account key
[Fri Apr 29 14:26:00 CST 2016] Creating csr
[Fri Apr 29 14:26:00 CST 2016] Single domain='mydomain.com'
[Fri Apr 29 14:26:00 CST 2016] Verify each domain
[Fri Apr 29 14:26:00 CST 2016] Getting webroot for domain='mydomain.com'
[Fri Apr 29 14:26:00 CST 2016] Getting token for domain='mydomain.com'
[Fri Apr 29 14:26:04 CST 2016] Found domain api file: /home/user/.acme.sh/dnsapi/dns_cx.sh
./acme.sh: 47: [: 1: unexpected operator
[Fri Apr 29 14:26:08 CST 2016] Updating record
./acme.sh: 53: [: 0: unexpected operator
[Fri Apr 29 14:26:09 CST 2016] Error add txt for domain:_acme-challenge.mydomain.com
Neilpang commented 8 years ago

我在本地试了一下, 没有问题。 你是什么系统? 可能是你那里访问 cloudxns的api server 出问题了。 你 curl https://www.cloudxns.net/ 试试。

Neilpang commented 8 years ago

https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh

Remonli commented 8 years ago

我没有安装,直接下载的acme.sh 和对应的api文件,然后在account.conf 放了对应的token。

之前le.sh 是可以的,现在不知道怎么不行了。

Neilpang commented 8 years ago

将主文件 和 api 文件的文件头改为bash 第一行, 改前 ···

!/usr/bin/env sh

··· 改后: ···

!/usr/bin/env bash

···

Remonli commented 8 years ago

可以了,谢谢。

Neilpang commented 8 years ago

这是sh 兼容的一个bug. 这几天没时间修。 建议你安装使用 不要直接拷贝

Remonli commented 8 years ago

https://github.com/Neilpang/acme.sh/commit/8d5618c44a2ab973aa7eb243db740e22c742b809

但这个commit只修复了cf 的api, 其他几个api没有改,有空请把其他几个文件改一下就好了。

Neilpang commented 8 years ago

改了: bb276fc985ea4b6585ac9530efc03e20215d9ad8