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.72k stars 438 forks source link

[Bug]: unable to initialize #1642

Open ctron opened 10 months ago

ctron commented 10 months ago

Steps to Reproduce

Run any step-ca command.

Your Environment

Expected Behavior

It gives instruction that work.

Actual Behavior

I get:

step-ca can't find or open the configuration file for your CA.
You may need to create a CA first by running `step ca init`.
Documentation: https://u.step.sm/docs/ca

Running step-ca init brings the same message.

Additional Context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

hslatman commented 10 months ago

Hi @ctron,

To create a configuration for the CA, you'll need to install the step CLI and use that as step ca init. This will create a CA configuration file, which can then be used to run step-ca.

ctron commented 10 months ago

That feels a bit weird.

hslatman commented 10 months ago

I agree it can be a bit surprising and that it adds a bit more friction to getting started to using the CA, especially if you're using the CA for the first time, but step and step-ca are different components with different responsibilities. I would say they're somewhat similar in nature as systemctl and systemd.

An improvement I can imagine we could add is to look for step in the path when this message is returned to the user. If it's not found, we could suggest the user to install it. But note that the message already says step ca init; not step-ca init.

ctron commented 10 months ago

An improvement I can imagine we could add is to look for step in the path when this message is returned to the user. If it's not found, we could suggest the user to install it. But note that the message already says step ca init; not step-ca init.

Yes, that would definitely help.