I have received the following error message when installing LetsEncrypt:
[root@server scripts]# ./letsencrypt.sh request server.vindjouwtrainer.nl 4096
Setting up certificate for a hostname: server.vindjouwtrainer.nl
Getting challenge for server.vindjouwtrainer.nl from acme-server…
./letsencrypt.sh: line 318: /var/www/html/.well-known/acme-challenge/: Is a directory
./letsencrypt.sh: line 321: [: -ne: unary operator expected
Waiting for domain verification…
rm: cannot remove ‘/var/www/html/.well-known/acme-challenge/’: Is a directory
Challenge is . Details: . Exiting…
Are you sure you’re using the client you think you are? The official client is certbot (though it was formerly called “letsencrypt” or “py-letsencrypt”), but you seem to be using letsencrypt.sh, which is a third party client.
I’ve never used letsencrypt.sh, it may be perfectly good, but you’re probably not going to get many people here with experience using it. Maybe you can find a solution by going through the client’s usage guide, and failing that, perhaps post an issue at github?
It's fairly popular as the bash clients go, but the syntax @VindJouwTrainer is using isn't even remotely correct for letsencrypt.sh. It doesn't look right for acme.sh either. And, of course, it doesn't even begin to resemble the syntax for certbot.
@VindJouwTrainer, where did you get the "letsencrypt.sh" you're using?
Ah, I stand corrected. The syntax used didn't resemble what was shown on the letsencrypt.sh site I linked above, but I didn't feel confident in commenting on that. I have zero experience with that client.
The format of the JSON from the ACME servers changed slightly in the last week, I’m not sure if letsencrypt.sh has been updated to deal with that, which may be causing the issue. You’ll certainly need the latest version of it though. The other two main bash scripts had a similar issue and the latest versions work fine.
As @DarkSteve says, it’s probably worth opening an issue on github.
Looks you're spot-on, letsencrypt.sh updated 3 days ago to fix "a json-parsing bug which made letsencrypt.sh incompatible with up-to-date ACME servers".
You're just too good, serverco I didn't realise the ACME servers updated json recently, I'm not paying enough attention!
I wrote / maintain the getssl bash client - and got a very similar error when the the JSON format changed, so I had a slight advantage in recognising it
@VindJouwTrainer, if you haven’t resolved this yet, update the client (letsencrypt.sh) and try again. This was an issue that was introduced on the ACME server side, but the developer recognised the issue and has since fixed it.
@DarkSteve Hi Steve, I have tried to update the client several times with the link you provided but the documentation doesn’t work. Any tips how to proceed?