get.acme.sh icon indicating copy to clipboard operation
get.acme.sh copied to clipboard

A way to force using wget

Open ghost opened this issue 8 years ago • 8 comments

The copy of curl included with my router firmware does not support https. The copy of wget in it does, but even if I use wget to execute get.acme.sh, the script still searches for curl and uses it by default.

I know I have a unique use-case trying to get an SSL cert for a router, but it would be nice if this was supported. This is (as far as I know) the only shell script style ACME client that doesn't require bash or some other more advanced shell. The router runs busybox, which of course only implements ash.

ghost avatar Feb 27 '17 04:02 ghost

@ColtonDRG

Yes, I will consider it.

For now, as a temp workaround, please add a file in you home dir: ~/.curlrc

insecure

Then your curl should be able to work.

Neilpang avatar Feb 27 '17 05:02 Neilpang

Please give me the output if you still have problems.

Neilpang avatar Feb 27 '17 05:02 Neilpang

Same error: curl: (1) Protocol "https" not supported or disabled in libcurl

ghost avatar Feb 27 '17 06:02 ghost

fwiw, if I manually make it use wget by editing get.sh and running it, I get the following.

Connecting to raw.githubusercontent.com (151.101.48.133:443)
-                    100% |*******************************|   135k  0:00:00 ETA
[Mon Feb 27 07:39:42 CET 2017] Installing from online archive.
[Mon Feb 27 07:39:42 CET 2017] Downloading https://github.com/Neilpang/acme.sh/archive/master.tar.gz
[Mon Feb 27 07:39:42 CET 2017] Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: 1
[Mon Feb 27 07:39:42 CET 2017] Download error.

ghost avatar Feb 27 '17 06:02 ghost

@ColtonDRG

fixed.

export  ACME_USE_WGET=1
wget -O-  https://get.acme.sh  | sh

Neilpang avatar Feb 27 '17 13:02 Neilpang

Ok, now I'm getting a different problem. Perhaps I should give up on getting a certificate for my router (at least from my router, getting one on another computer and uploading it could still work).

root@router:/tmp/home/root# export  ACME_USE_WGET=1
root@router:/tmp/home/root# wget -O-  https://get.acme.sh  | sh
Connecting to get.acme.sh (195.154.91.106:443)
-                    100% |*******************************|   705   0:00:00 ETA
Connecting to raw.githubusercontent.com (151.101.192.133:443)
-                    100% |*******************************|   136k  0:00:00 ETA
[Wed Mar  1 05:19:33 CET 2017] Installing from online archive.
[Wed Mar  1 05:19:33 CET 2017] Downloading https://github.com/Neilpang/acme.sh/archive/master.tar.gz
wget: unrecognized option `--help'
BusyBox v1.25.0 (2016-12-05 06:35:19 CET) multi-call binary.

Usage: wget [-csq] [-O FILE] [-Y on/off] [-P DIR] [-U AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

	-s	Spider mode - only check file existence
	-c	Continue retrieval of aborted transfer
	-q	Quiet
	-P DIR	Save to DIR (default .)
	-T SEC	Network read timeout is SEC seconds
	-O FILE	Save to FILE ('-' for stdout)
	-U STR	Use STR for User-Agent header
	-Y	Use proxy ('on' or 'off')
wget: unrecognized option `--user-agent='
BusyBox v1.25.0 (2016-12-05 06:35:19 CET) multi-call binary.

Usage: wget [-csq] [-O FILE] [-Y on/off] [-P DIR] [-U AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

	-s	Spider mode - only check file existence
	-c	Continue retrieval of aborted transfer
	-q	Quiet
	-P DIR	Save to DIR (default .)
	-T SEC	Network read timeout is SEC seconds
	-O FILE	Save to FILE ('-' for stdout)
	-U STR	Use STR for User-Agent header
	-Y	Use proxy ('on' or 'off')
[Wed Mar  1 05:19:33 CET 2017] Please refer to https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html for error code: 1
[Wed Mar  1 05:19:34 CET 2017] Download error.
root@router:/tmp/home/root# 

ghost avatar Mar 01 '17 04:03 ghost

Please check if your wget has a --header option:

wget  --header "a:b"  https://www.google.com

Neilpang avatar Mar 01 '17 05:03 Neilpang

It does not.

root@router:/tmp/home/root# wget --header "a:b" https://www.google.com
wget: unrecognized option `--header'
BusyBox v1.25.0 (2016-12-05 06:35:19 CET) multi-call binary.

ghost avatar Mar 01 '17 20:03 ghost