flux2
flux2 copied to clipboard
Flux CLI support for parameters from env vars (at least sensitive ones such as password)
Discussed in https://github.com/fluxcd/flux2/discussions/2557
Originally posted by canidam March 21, 2022 Bootstrapping flux with git subcommand using credentials requires the user to provide password over CLI.
# Run bootstrap for a Git repository and authenticate using a password
flux bootstrap git --url=https://example.com/repository.git --password=<password>
This is a bad pattern. I find it weird flux doesn't support provide credentials over environment variables or from a file.
Couple of problems with such pattern:
- Password is kept in history by default (unless user remembers to start with the command with a space)
- Other users on the machine can read the password in clear-text with
ps -aux
Why does the flux CLI doesn't support variables from the environment? Is that something worth opening a PR for?
I use the git provider for bitbucket server, that's why I need it. I'll open PR to align this with the other providers