Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide password from file or environment variable #381

Closed
alperyilmaz opened this issue Jun 24, 2024 · 4 comments
Closed

provide password from file or environment variable #381

alperyilmaz opened this issue Jun 24, 2024 · 4 comments

Comments

@alperyilmaz
Copy link

Describe the bug
I'm using gpclient cli within docker container. For more automated use, I need to provide the password from file (or environment variable) but I cannot do that right now, I need to enter the password in interactive TTY. When I searched previous issues, found one about credentials being saved but couldn't figure out how to use it to solve my issue.

Expected behavior
Using a commandline argument to provide a filename or environment variable which contains password so that gpclient can be more scriptable without user intervention

Environment:

  • OS: Ubuntu 22.04 (within docker)
  • Desktop Environment: none
  • Is remote SSH? Yes
@yuezk
Copy link
Owner

yuezk commented Jun 24, 2024

Currently, the username can be passed via the -u option, while the password must be from the user input. I will evaluate if it is possible to read the password from the std in. So usage like echo "$PASSWORD" | gpclient connect <portal> -u user could work.

yuezk added a commit that referenced this issue Jul 7, 2024
@yuezk
Copy link
Owner

yuezk commented Jul 9, 2024

@alperyilmaz In 2.3.4, you can pass the password from stdin, via echo "$PASSWORD" | sudo gpclient connect <portal> -u <user> --passwd-on-stdin

@yuezk
Copy link
Owner

yuezk commented Jul 10, 2024

Closing it for now, feel free to reopen if it still has the issue.

@yuezk yuezk closed this as completed Jul 10, 2024
@alperyilmaz
Copy link
Author

thanks.. it works!..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants