Hello, I tried generating a ssl certificate using certbot and node and while doing so I got this long error message. I tried the exact commands from this guide Generate Wildcard SSL certificate using Let’s Encrypt/Certbot | by Saurabh Palande | Medium
what i didn't do was in the certbot-auto folder. Do I need to be in that folder to execute this command? moreover I couldn't find the certbot-auto folder after cloning the repo. I saw letsencrypt-auto-source. is that the new certbot-auto folder?
Here is the error message
exec error: Error: Command failed: sudo certbot certonly --manual --preferred-challenges=dns --email johndoe@gmail.com --server https: //acme-v02.api.letsencrypt.org/directory --agree-tos -d example.com *.example.com
usage:
certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...
Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
it will attempt to use a webserver both for obtaining and installing the
certificate.
certbot: error: unrecognized arguments: //acme-v02.api.letsencrypt.org/directory *.example.com
and this is my code in express using the exec command from child_process in nodejs
app.post("/test", (req, res) => {
exec(
`sudo certbot certonly --manual --preferred-challenges=dns --email ${req.body.email} --server https: //acme-v02.api.letsencrypt.org/directory --agree-tos -d ${req.body.domain} *.${req.body.domain}`,
(error, stdout, stderr) => {
if (error) {
console.log(`exec error: ${error}`);
return;
}
console.log(`stdout: ${stdout}`);
console.log(`stderr: ${stderr}`);
}
);
res.json("all okay");
});