Write your first secret
secrethub repo init your-username/start
Now let’s write a secret. Run the
write command and type
Hello World when prompted:
secrethub write your-username/start/hello-world
A secret named
hello-world with value
Hello World is now written to SecretHub.
Under the hood, everything is encrypted automatically.
ls command to list the contents of your repository:
secrethub ls your-username/start
To read the newly created secret, simply use the
secrethub read your-username/start/hello-world:latest
Secrets are automatically versioned so you’ll never accidentally overwrite a secret.
You can access a specific version of a secret by appending the version number to the path, e.g.
When no version number is given, it defaults to
A few cool features
- Because we know you love to script,
writealso accepts input on
echo "Hello World" | secrethub write your-username/start/hello-world
- Whenever you need to copy-paste a secret into a GUI, you can use the
--clipflag to copy the value to the clipboard for 45 seconds.
secrethub read --clip your-username/start/hello-world
- To generate random secrets, you can use the built-in
secrethub generate rand your-username/start/generated