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

Support --password-stdin, similar to other OCI tools #241

Open
zortness opened this issue Feb 23, 2021 · 1 comment
Open

Support --password-stdin, similar to other OCI tools #241

zortness opened this issue Feb 23, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@zortness
Copy link

When using repositories like AWS ECR, the authentication expires quite rapidly and the generated passwords tend to be quite long. Other extant OCI style tools, such as the docker utility, support taking in a password from stdin, allowing the developer to skip a step of making a temporary file or copying the password to the clipboard.

Using --password-stdin will match up with the docker and podman utilities, and coincide well with AWS's instructions on how to use their ECR service.

Before:

aws ecr get-login-password --region us-west-2 > .ecr_pw
<cat or copy really_long_pw to clipboard>
wasme login -s <aws_ecr_url> -u AWS -p <paste really_long_pw>

After:

aws ecr get-login-password --region us-west-2 | wasme login -s <aws_ecr_url> -u AWS --password-stdin
@zortness zortness added the enhancement New feature or request label Feb 23, 2021
@zortness
Copy link
Author

Consequently because wasme is using the oras library, the temporary workaround I have here is to log in via the oras command line tool before attempting wasme push or wasme pull commands.

EG:

aws ecr get-login-password --region us-west-2 | oras login -u AWS --password-stdin <aws_ecr_url>
wasme push <aws_ecr_url>/image:<version>

This works because oras writes out login information to ~/.docker/config.json, which the library also reads from by default.

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

No branches or pull requests

1 participant