go-acme / lego

Let's Encrypt/ACME client and library written in Go
https://go-acme.github.io/lego/
MIT License
7.99k stars 1.02k forks source link

NSOne (ns1) Provider Not Recognized #1617

Closed gareththered closed 2 years ago

gareththered commented 2 years ago

Welcome

What did you expect to see?

I expected to see lego at least attempt to enrol for a Let's Encrypt certificate.

What did you see instead?

lego failed instantly with:

2022/04/07 21:20:14 unrecognized DNS provider: ns1

How do you use lego?

Binary

Reproduction steps

  1. Run:
    $ NS1_API_KEY=abcdef... \
    lego --dns.resolvers 1.1.1.1:53 --accept-tos --email {my email} --dns "ns1" \
    --domains "*.{my TLD}" --server "https://acme-staging-v02.api.letsencrypt.org/directory" run
  2. Confirm that it's built with NS1 support:
    
    $ lego dnshelp -c ns1
    Configuration for NS1.
    Code:   'ns1'
    Since:  'v0.4.0'

Credentials:

Additional Configuration:

More information: https://go-acme.github.io/lego/dns/ns1


### Version of lego

```console
lego version dev linux/amd64

I've also tried on arm64 and the results are the same.

Logs

No logs.

Go environment (if applicable)

No response

ldez commented 2 years ago

Hello,

I don't reproduce your problem:

$ NS1_API_KEY=xxx lego --dns.resolvers 1.1.1.1:53 --accept-tos --email foo@foo.com --dns "ns1" --domains "*.foo.com" --server "https://acme-staging-v02.api.letsencrypt.org/directory" run
2022/04/08 00:54:23 [INFO] acme: Registering account for foo@foo.com
!!!! HEADS UP !!!!

Your account credentials have been saved in your Let's Encrypt
configuration directory at "/home/ldez/sources/go/src/github.com/go-acme/lego/.lego/accounts".

You should make a secure backup of this folder now. This
configuration directory will also contain certificates and
private keys obtained from Let's Encrypt so making regular
backups of this folder is ideal.
2022/04/08 00:54:23 [INFO] [*.foo.com] acme: Obtaining bundled SAN certificate
2022/04/08 00:54:23 [INFO] [*.foo.com] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/2121235618
2022/04/08 00:54:23 [INFO] [*.foo.com] acme: use dns-01 solver
2022/04/08 00:54:23 [INFO] [*.foo.com] acme: Preparing to solve DNS-01
2022/04/08 00:54:24 [INFO] [*.foo.com] acme: Cleaning DNS-01 challenge
...

lego version dev linux/amd64

Your version doesn't seem to be an official version.

The expected output is :

$ lego --version
lego version 4.6.0 linux/amd64
gareththered commented 2 years ago

Apologies - senior moment there on my part.

As you say dev cannot be a version as it would be a moving window, dependent on when it was built/packaged. It turns out that Debian is way behind.

I've downloaded the latest binary and it works perfectly.