acme.sh
acme.sh copied to clipboard
Report bugs to porkbun dns api
This is the place to report bugs in the porkbun DNS API.
If you experience a bug, please report it in this issue.
Thanks!
thanks, tested and worked fine.
Not sure what to submit but issuing a cert for a subdomain creates TXT record for the domain and hence verify fails.
@GeorgeRT With this patch I made cert for my 4th-level subdomain:
*** /home/foo/dns_porkbun.sh 2021-04-04 21:19:04.628732412 +0000
--- /home/foo/dns_porkbun.sh.working 2021-04-04 23:53:21.227966009 +0000
***************
*** 110,117 ****
if _porkbun_rest POST "dns/retrieve/$h"; then
if _contains "$response" "\"status\":\"SUCCESS\""; then
- _sub_domain="$(echo "$fulldomain" | sed "s/\\.$_domain\$//")"
_domain=$h
return 0
else
_debug "Go to next level of $_domain"
--- 110,117 ----
if _porkbun_rest POST "dns/retrieve/$h"; then
if _contains "$response" "\"status\":\"SUCCESS\""; then
_domain=$h
+ _sub_domain="$(echo "$fulldomain" | sed "s/\\.$_domain\$//")"
return 0
else
_debug "Go to next level of $_domain"
tldr: in function _get_root value of _sub_domain should be calculated after value of _domain
Keep in mind that dns changes may take a long time to propagate. Like 10 minutes or more.
That woks. Thanks.
When dns_porkbun.sh deletes the txt that has the value begins a dash, grep fails in dns_porkbun_rm().
Fri May 7 02:37:26 2021 daemon.info run-acme[31357]: Removing txt: -qb09FX66q************************** for domain: _acme-challenge.alias*************.net
Fri May 7 02:37:35 2021 daemon.err run-acme[31357]: grep: unrecognized option: b
Fri May 7 02:37:35 2021 daemon.err run-acme[31357]: BusyBox v1.33.0 () multi-call binary.
Fri May 7 02:37:35 2021 daemon.err run-acme[31357]:
Fri May 7 02:37:35 2021 daemon.err run-acme[31357]: Usage: grep [-HhnlLoqvsrRiwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...
'--' may solve this.
- record_id=$(echo "$response" | tr '{' '\n' | grep "$txtvalue" | cut -d, -f1 | cut -d: -f2 | tr -d \")
+ record_id=$(echo "$response" | tr '{' '\n' | grep -- "$txtvalue" | cut -d, -f1 | cut -d: -f2 | tr -d \")
https://stackoverflow.com/questions/2427913/
@zodiaq please upgrade to dev branch:
acme.sh --upgrade -b dev
The records being added via API have the wrong domain name.
I've issued a cert via
./acme.sh --issue --domain cronfire.ru --domain *.cronfire.ru --home "." --dns dns_porkbun --challenge-alias le.cronfire.ru
But the records added are these:
Names should be 'le.cronfire.ru', not 'le.le.cronfire.ru'
[Sat May 22 20:03:30 MSK 2021] Checking cronfire.ru for _acme-challenge.le.cronfire.ru
UPD: fixed in #3529
Tried issuing a cert without challenge-alias:
./acme.sh --issue -d s3.haarolean.dev --home "." --dns dns_porkbun
The record was added for _acme-challenge.haarolean.dev but was checked for s3.haarolean.dev
[Thu May 27 04:07:03 MSK 2021] Checking s3.haarolean.dev for _acme-challenge.s3.haarolean.dev
I have to edit the record name manually again.
UPD: fixed in #3529
satoshi@vmi565604:/etc/nginx/acme-config$ acme.sh --config-home . --issue --dns dns_porkbun -d expectchaos.com -d www.expectchaos.com
[Thu 29 Jul 2021 01:59:53 AM CEST] Using CA: https://acme.zerossl.com/v2/DV90
[Thu 29 Jul 2021 01:59:53 AM CEST] Multi domain='DNS:expectchaos.com,DNS:www.expectchaos.com'
[Thu 29 Jul 2021 01:59:53 AM CEST] Getting domain auth token for each domain
[Thu 29 Jul 2021 01:59:56 AM CEST] Getting webroot for domain='expectchaos.com'
[Thu 29 Jul 2021 01:59:56 AM CEST] Getting webroot for domain='www.expectchaos.com'
[Thu 29 Jul 2021 01:59:56 AM CEST] Adding txt value: -TimXiF76VxjJHkIZbg3LSLBQ_-v3hXjJ8YJgtDZENc for domain: _acme-challenge.expectchaos.com
[Thu 29 Jul 2021 02:00:17 AM CEST] Error add txt for domain:_acme-challenge.expectchaos.com
[Thu 29 Jul 2021 02:00:17 AM CEST] Please add '--debug' or '--log' to check more details.
[Thu 29 Jul 2021 02:00:17 AM CEST] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
no idea whats wrong but cant seem to use porkbun
Run it with --debug and check the logs as it says. It will explain everything.
On Thu, Jul 29, 2021, at 03:08, Tommi Niemi wrote:
@.***:/etc/nginx/acme-config$ acme.sh --config-home . --issue --dns dns_porkbun -d expectchaos.com -d www.expectchaos.com [Thu 29 Jul 2021 01:59:53 AM CEST] Using CA: https://acme.zerossl.com/v2/DV90 [Thu 29 Jul 2021 01:59:53 AM CEST] Multi domain='DNS:expectchaos.com,DNS:www.expectchaos.com' [Thu 29 Jul 2021 01:59:53 AM CEST] Getting domain auth token for each domain [Thu 29 Jul 2021 01:59:56 AM CEST] Getting webroot for domain='expectchaos.com' [Thu 29 Jul 2021 01:59:56 AM CEST] Getting webroot for domain='www.expectchaos.com' [Thu 29 Jul 2021 01:59:56 AM CEST] Adding txt value: -TimXiF76VxjJHkIZbg3LSLBQ_-v3hXjJ8YJgtDZENc for domain: _acme-challenge.expectchaos.com [Thu 29 Jul 2021 02:00:17 AM CEST] Error add txt for domain:_acme-challenge.expectchaos.com [Thu 29 Jul 2021 02:00:17 AM CEST] Please add '--debug' or '--log' to check more details. [Thu 29 Jul 2021 02:00:17 AM CEST] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh ` no idea whats wrong but cant seem to use porkbun
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/acmesh-official/acme.sh/issues/3450#issuecomment-888700299, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALM2SYZ7QAV6V4325Z3RZ3T2CLXZANCNFSM4ZD6Y4YQ.
just read the topic earlier. seems like properly set config path "." instaed of "/etc/nginx/acme-config" was the problem here. solved cheers
Are you asking me to read my own messages again?:)) The porkbun API works fine for me with the changes from my PR #3529.
On Thu, Jul 29, 2021, at 03:23, Tommi Niemi wrote:
just read the topic earlier. seems like properly set config path . was the problem
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/acmesh-official/acme.sh/issues/3450#issuecomment-888705885, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALM2S6TLSKFJI76NNPGOVLT2CNQNANCNFSM4ZD6Y4YQ.
i have this code:
module.exports.getDomains = async function(apikey, config_json, domain){
options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': apikey
},
body: JSON.stringify({data: config_json})
};
myResponse = await fetch('https://api-ipv4.porkbun.com/api/json/v3/dns/retrieve/' + domain, options).catch(err=>{console.log(err)})
domainsobject = await myResponse.json()
console.log(domainsobject)
return domainsobject
}
this is a function that is called in a nodejs project like this:
domainsObject = await porkbun_api.getDomains("here goes api key", config_json_object, "randomdomain")
and it prints in the console:
{ status: 'ERROR',
message: 'All API requests require an API key.' }
Please help!
i have this code:
module.exports.getDomains = async function(apikey, config_json, domain){options = {method: 'POST',headers: {'Content-Type': 'application/json','x-api-key': apikey},body: JSON.stringify({data: config_json})};myResponse = await fetch('https://api-ipv4.porkbun.com/api/json/v3/dns/retrieve/' + domain, options).catch(err=>{console.log(err)})domainsobject = await myResponse.json()console.log(domainsobject)return domainsobject}this is a function that is called in a nodejs project like this:domainsObject = await porkbun_api.getDomains("here goes api key", config_json_object, "randomdomain")and it prints in the console: { status: 'ERROR', message: 'All API requests require an API key.' } Please help!
i forgot to mention that i already tried to change inside header:
'x-api-key': apikey
Authorization: 'Bearer' + apikey
Update: I have opened a PR.
Just received the following email from Porkbun:
In order to ensure that any apps or tools you may have that utilize our API, we wanted to let you know about some upcoming critical updates.
We know these kinds of changes are annoying but the time has come to separate the processing of incoming API commands from our website. In previous documentation the hostname porkbun.com was used for the API but we have recently updated it to api.porkbun.com and in the near future will start enforcing its use. Please update the hostname for our API to api.porkbun.com as soon as possible.
CRITICAL UPDATE DETAILS
Type: API Hostname Change
Old Value: porkbun.com
New Value: api.porkbun.com
Deadline: 2024-12-01 00:00:00 UTC
Please note that after the deadline, API calls made to the old hostname will no longer be allowed. If you have any questions or concerns please contact support.