wjiec / alidns-webhook

alidns-webhook is a generic ACME solver for cert-manager.
MIT License
36 stars 10 forks source link

Failed to add TXT record #11

Closed suoji-tarpan closed 7 months ago

suoji-tarpan commented 7 months ago

创建Cert时报错 E0201 10:51:04.959036 1 alidns.go:57] Failed to add TXT record for "_acme-challenge.abc.com.cn." cause by "Post \"https://alidns.cn-hangzhou.aliyuncs.com/?DomainName=abc.com.cn&KeyWord=_acme-challenge&SearchMode=EXACT&TypeKeyWord=TXT\": net/http: invalid header field value for \"Authorization\""

wjiec commented 7 months ago

@suoji-tarpan Very strange! I checked the code in the SDK and the only thing I think is possible is that your accessKeyId should have extra control characters like \n, if you can please provide the yaml configuration of your issuer and secret (only the accessKeyId is needed, make sure you secure your accessKeySecret)?

suoji-tarpan commented 7 months ago

thanks a lot!!!! there is a character '\n' in accessKeyId and accessKeySecret, now, it worked perfectly!!!!