Push
Command to push secrets to Stashbase
You can easily push local secrets to Stashbase using the push command.
Stashbase CLI will automatically search for the config file stashbase.yaml file in the current directory.
If there are multiple entries in the config file like above, Stashbase CLI will propmpt you to select one. The command will return error if there is not pull property in the selected entry.
Learn more about custom config files
For now you must use this command with custom config files.
As with the pull command you can provide the arguments to override secrets config like exclude or change the output format directly in the push command.
stashbase push [OPTIONS]Options
Prop
Type
Example
This is an example of using custom config file with push command.
Config file
- project: our-project
environment: api_prod
description: Used only for database migrations
push:
file: secrets.yaml
secrets:
only:
- DATABASE_URL
- project: our-project
environment: api_dev
description: Database in test environment
push:
file: .env.yaml
# specific for push command
secrets:
only:
- JWT_SECRETCommand
# auto detect config file in the current directory and select
stashbase push
# provide custom config file path
stashbase push --file my-file.yaml
# override options
stashbase push --exclude DATABASE_URL --file .env