feat: prompt for access tokens in 'bootstrap' command
This change adds functionality to both, `bootstrap github` and
`bootstrap gitlab` to prompt the user for the personal access tokens
if those can't be derived from the shell environment. Echoing is
turned off for better privacy.
Instead of having to interactively type the token or manually paste it
from the clipboard, users can also pipe it to Flux which comes in
handy e.g. when executing Flux remotely over an SSH connection:
```
$ echo 'asdf' | flux bootstrap github
```
Otherwise, Flux will prompt the user:
```
$ flux bootstrap github
Please type your GitHub personal access token:
```
closes #2011
Signed-off-by:
Max Jonas Werner <mail@makk.es>
... | @@ -29,6 +29,7 @@ require ( | ... | @@ -29,6 +29,7 @@ require ( |
github.com/spf13/cobra v1.1.3 | github.com/spf13/cobra v1.1.3 | ||
github.com/spf13/pflag v1.0.5 | github.com/spf13/pflag v1.0.5 | ||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b | golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b | ||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d | |||
k8s.io/api v0.22.2 | k8s.io/api v0.22.2 | ||
k8s.io/apiextensions-apiserver v0.22.2 | k8s.io/apiextensions-apiserver v0.22.2 | ||
k8s.io/apimachinery v0.22.2 | k8s.io/apimachinery v0.22.2 | ||
... | ... |
Please register or sign in to comment