Open zortness opened 3 years ago
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.
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 thedocker
andpodman
utilities, and coincide well with AWS's instructions on how to use their ECR service.Before:
After: