Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unrecognized option '--conf-path=[^ ]* ' for nginx config #4746

Closed
Nirzak opened this issue Aug 20, 2023 · 4 comments
Closed

unrecognized option '--conf-path=[^ ]* ' for nginx config #4746

Nirzak opened this issue Aug 20, 2023 · 4 comments

Comments

@Nirzak
Copy link
Contributor

Nirzak commented Aug 20, 2023

Steps to reproduce

Just try to install a certificate using acme.sh on ubuntu 22.
Debug log

[Sun Aug 20 18:52:04 UTC 2023] Nginx mode for domain:zaksb.nirzak.codes
grep: unrecognized option '--conf-path=[^ ]* '
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.
[Sun Aug 20 18:52:04 UTC 2023] Can not find nginx conf.
[Sun Aug 20 18:52:04 UTC 2023] Please add '--debug' or '--log' to check more details.
[Sun Aug 20 18:52:04 UTC 2023] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
[Sun Aug 20 18:52:05] ERROR Certificate could not be issued.

Additional Info

The following code may have the issue.
NGINX_CONF="$(nginx -V 2>&1 | _egrep_o "--conf-path=[^ ]* " | tr -d " ")"

No escape parameter is used in the egrep pattern. If I modify the pattern like as the following then the code works.
_egrep_o "\-\-conf-path=[^ ]* "

I can make a pull request if you want. Thanks.

acme.sh  --issue .....   --debug 2
@github-actions
Copy link

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.

@tpedretti
Copy link

Same problem in #4725 I would say do a pull request for the fix and submit it, as my issue has been open for 3 weeks now and nothing. The problem started in 3.0.7, if you downgrade to 3.0.6 it works.

@Nirzak
Copy link
Contributor Author

Nirzak commented Aug 21, 2023

Thanks created a pull request for this. Hope they will merge and fix the issue.

@Nirzak Nirzak changed the title unrecognized option '--conf-path=[^ ]* ' for niginx config unrecognized option '--conf-path=[^ ]* ' for nginx config Aug 21, 2023
@victorxys
Copy link

Excuse me may I ask how to downgrade to 3.0.6? I did't find any answer from google

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants