smallstep / certificates

🛡️ A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH.
https://smallstep.com/certificates
Apache License 2.0
6.36k stars 415 forks source link

[Docs]: step ca token requires the --ca-url #1824

Closed patsevanton closed 2 months ago

patsevanton commented 2 months ago

Hello! I read https://smallstep.com/docs/step-ca/basic-certificate-authority-operations/#issue-a-certificate-using-a-single-use-ca-token

TOKEN=$(step ca token localhost)

But i get error

TOKEN=$(step ca token localhost)
'step ca token' requires the '--ca-url' flag

version - 0.25.2

hslatman commented 2 months ago

Hey @patsevanton, step reads commonly used default flag values from ~/.step/defaults.json (or one of the contexts). That file is written if you use step ca bootstrap to bootstrap trust with the CA. Without that file, step has no way of knowing to which CA to connect to, and thus needs the --ca-url to be provided.