acmesh-official / acme.sh

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

群辉部署证书,我确保使用的账户名和密码是对的,而且没有开多重认证,但看报错日志显示无法登录,是docker版的acme.sh,刚刚拉了最新docker镜像 #4881

Open Subdue0 opened 11 months ago

Subdue0 commented 11 months ago

[Fri Nov 24 03:24:57 UTC 2023] GET [Fri Nov 24 03:24:57 UTC 2023] url='http://localhost:5000/webapi/query.cgi?api=SYNO.API.Info&version=1&method=query&query=SYNO.API.Auth' [Fri Nov 24 03:24:57 UTC 2023] timeout= [Fri Nov 24 03:24:57 UTC 2023] _CURL='curl --silent --dump-header /acme.sh/http.header -L --trace-ascii /tmp/tmp.3UFUvDGwOe -g ' [Fri Nov 24 03:24:57 UTC 2023] ret='0' [Fri Nov 24 03:24:57 UTC 2023] Logging into localhost:5000 Enter OTP code for user 'me': Enter device name or leave empty for default (CertRenewal): [Fri Nov 24 03:24:57 UTC 2023] GET [Fri Nov 24 03:24:57 UTC 2023] url='http://localhost:5000/webapi/auth.cgi?api=SYNO.API.Auth&version=6&method=login&format=sid&account=***&passwd=***&otp_code=&enable_syno_token=yes&enable_device_token=yes&device_name=CertRenewal' [Fri Nov 24 03:24:57 UTC 2023] timeout= [Fri Nov 24 03:24:57 UTC 2023] _CURL='curl --silent --dump-header /acme.sh/http.header -L --trace-ascii /tmp/tmp.2qCys1dfFJ -g ' [Fri Nov 24 03:24:58 UTC 2023] ret='0' [Fri Nov 24 03:24:58 UTC 2023] SYNO_Device_ID [Fri Nov 24 03:24:58 UTC 2023] Session ID='aPtMS6KH7tlTUI-LQZVga1fHrgYYYR7SVvZjsjAkA1sNsY99jBnZfyoJfqxQPimxT-9hkEMEiTMiyLpwbEUwwQ' [Fri Nov 24 03:24:58 UTC 2023] SynoToken='uqJFpY8PN6b6c' [Fri Nov 24 03:24:58 UTC 2023] Unable to authenticate to http://localhost:5000 - check your username & password. [Fri Nov 24 03:24:58 UTC 2023] If two-factor authentication is enabled for the user, set SYNO_Device_ID. [Fri Nov 24 03:24:58 UTC 2023] Error deploy for domain:v4u.site [Fri Nov 24 03:24:58 UTC 2023] Deploy error.

github-actions[bot] commented 11 months ago

Please upgrade to the latest code and try again first. Maybe it's already fixed. acme.sh --upgrade If it's still not working, please provide the log with --debug 2, otherwise, nobody can help you.

Subdue0 commented 11 months ago

Please upgrade to the latest code and try again first. Maybe it's already fixed. acme.sh --upgrade If it's still not working, please provide the log with --debug 2, otherwise, nobody can help you.

上面就是--debug 2的日志

xmushimushi commented 11 months ago

我也是一样的问题

[Fri Nov 24 11:36:34 UTC 2023] Getting API version [Fri Nov 24 11:36:34 UTC 2023] GET [Fri Nov 24 11:36:34 UTC 2023] url='https ://..*:5001 /webapi/query.cgi?api=SYNO.API.Info&version=1&method=query&query=SYNO.API.Auth' [Fri Nov 24 11:36:34 UTC 2023] timeout= [Fri Nov 24 11:36:34 UTC 2023] _CURL='curl --silent --dump-header /acme.sh/http.header -L --trace-ascii /tmp/tmp.dVYjCSptfx -g --insecure ' [Fri Nov 24 11:36:34 UTC 2023] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 3 [Fri Nov 24 11:36:34 UTC 2023] Here is the curl dump log: [Fri Nov 24 11:36:34 UTC 2023] == Info: URL rejected: Malformed input to a URL function == Info: Closing connection [Fri Nov 24 11:36:34 UTC 2023] ret='3' [Fri Nov 24 11:36:34 UTC 2023] Logging into *..*:5001 [Fri Nov 24 11:36:41 UTC 2023] GET [Fri Nov 24 11:36:41 UTC 2023] url='https ://*..:5001 /webapi/?api=SYNO.API.Auth&version=&method=login&format=sid&account=%0d&passwd=**%0d&otp_code=766930&enable_syno_token=yes&enable_device_token=yes&device_name=ACME-S2' [Fri Nov 24 11:36:41 UTC 2023] timeout= [Fri Nov 24 11:36:41 UTC 2023] _CURL='curl --silent --dump-header /acme.sh/http.header -L --trace-ascii /tmp/tmp.uYxov06w1Q -g --insecure ' [Fri Nov 24 11:36:41 UTC 2023] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 3 [Fri Nov 24 11:36:41 UTC 2023] Here is the curl dump log: [Fri Nov 24 11:36:41 UTC 2023] == Info: URL rejected: Malformed input to a URL function == Info: Closing connection [Fri Nov 24 11:36:41 UTC 2023] ret='3' [Fri Nov 24 11:36:41 UTC 2023] SYNO_Device_ID [Fri Nov 24 11:36:41 UTC 2023] Session ID [Fri Nov 24 11:36:41 UTC 2023] SynoToken [Fri Nov 24 11:36:41 UTC 2023] Unable to authenticate to https ://..:5001

xmushimushi commented 11 months ago

I dont understand about the SYNO_Device_ID.... Is that it will return by DSM itself when i successfully authenticate for first time?

Subdue0 commented 11 months ago

I dont understand about the SYNO_Device_ID.... Is that it will return by DSM itself when i successfully authenticate for first time?

我降级到3.0.6可以了,新版的acme的bug很多

xmushimushi commented 11 months ago

I dont understand about the SYNO_Device_ID.... Is that it will return by DSM itself when i successfully authenticate for first time?

我降级到3.0.6可以了,新版的acme的bug很多

那个TOTP是如何放入的? 我试了export SYNO_TOTP_SECRET=“XXXX” 还是不能呢....

Subdue0 commented 11 months ago

I dont understand about the SYNO_Device_ID.... Is that it will return by DSM itself when i successfully authenticate for first time?

我降级到3.0.6可以了,新版的acme的bug很多

那个TOTP是如何放入的? 我试了export SYNO_TOTP_SECRET=“XXXX” 还是不能呢....

!/bin/bash

export ZEROSSL_EMAIL="**"

export DOMAIN="**"

export SYNO_USERNAME="**" export SYNO_PASSWORD="**"

export DNS="dns_cf" export CF_KEY="**" export CF_EMAIL="**"

echo "${SYNO_PASSWORD}" | sudo -S docker run --rm -v "/volume1/docker/acme":"/acme.sh" --net=host neilpang/acme.sh:3.0.6 --register-account -m "${ZEROSSL_EMAIL}" --server zerossl

sleep 30

echo "${SYNO_PASSWORD}" | sudo -S docker run --rm -v "/volume1/docker/acme":"/acme.sh" -e CF_Key="${CF_KEY}" -e CF_Email="${CF_EMAIL}" --net=host neilpang/acme.sh:3.0.6 --issue --dns "${DNS}" --dnssleep 60 -d "${DOMAIN}" -d "*.${DOMAIN}" --keylength 4096 --force

sleep 600

echo "${SYNO_PASSWORD}" | sudo -S docker run --rm -v "/volume1/docker/acme":"/acme.sh" -e SYNO_Hostname="${DOMAIN}" -e SYNO_Port="5001" -e SYNO_Username="${SYNO_USERNAME}" -e SYNO_Password="${SYNO_PASSWORD}" -e SYNO_Scheme="https" -e SYNO_Certificate="caupdate" -e SYNO_Create=1 --net=host neilpang/acme.sh:3.0.6 --deploy -d "${DOMAIN}" -d "*.${DOMAIN}" --deploy-hook synology_dsm --insecure

exit 0

Subdue0 commented 11 months ago

I dont understand about the SYNO_Device_ID.... Is that it will return by DSM itself when i successfully authenticate for first time?

我降级到3.0.6可以了,新版的acme的bug很多

那个TOTP是如何放入的? 我试了export SYNO_TOTP_SECRET=“XXXX” 还是不能呢....

按照我这个来就可以了

xmushimushi commented 11 months ago

你没用 2FA - OTP 是吗?

还有我的 DSM 是 7.2.1 - 65097 Update 1

xmushimushi commented 11 months ago

我用了 3.0.7, 是可以了。 DSM : 7.2.1 - 65097 Update 1

有两个问题

  1. Cloud Flare 不能用 ZonesID, 要用GlobalAPIKey, 有 BUG
  2. 只可以放 OTP 而已 不可以 Approve-Signin 让后再OTP。。。。
Subdue0 commented 11 months ago

DSM 6.2.3-25426,我这个版本不行

hunter8605 commented 9 months ago

I dont understand about the SYNO_Device_ID.... Is that it will return by DSM itself when i successfully authenticate for first time?

我降级到3.0.6可以了,新版的acme的bug很多

太坑了,果然降版本就可以了

yukiChow commented 8 months ago

I dont understand about the SYNO_Device_ID.... Is that it will return by DSM itself when i successfully authenticate for first time?

我降级到3.0.6可以了,新版的acme的bug很多

请问降级后如何禁用自动更新呢,我是用docker部署的,环境变量也加了AUTO_UPGRADE=0,查看日志还是会自动更新到3.0.8

laogao001 commented 5 months ago

I dont understand about the SYNO_Device_ID.... Is that it will return by DSM itself when i successfully authenticate for first time?我不明白SYNO_Device_ID......当我第一次成功认证时,DSM 本身会返回吗?

我降级到3.0.6可以了,新版的acme的bug很多

请问降级后如何禁用自动更新呢,我是用docker部署的,环境变量也加了AUTO_UPGRADE=0,查看日志还是会自动更新到3.0.8

我也是这个问题,