SNOW-930434: docker login using a token doesn't work
Closed this issue · 6 comments
SnowCLI version
2.0.0-dev
Python version
Python 3.10.11
Platform
macOS-10.16-x86_64-i386-64bit
What happened
snow registry token is not working in the following scenario
- I have a connection defined in env variables pointing to schema A. There is no image repository there but when I do
snow registry token
I still get a token (I would expect an error message) - I'm doing
snow registry token --schema B
where I have an actual repository, getting a token, however when I try to pipe it todocker login
I'm getting an error
Console output
Error response from daemon: Get "https://orgname-accountname.registry.snowflakecomputing.com/v2/": unknown: Failure: Failed to perform repository operation.
How to reproduce
No response
Related to #424
@sfc-gh-turbaszek Still not working in 1.1.1
There is a chance I'm doing something wrong. Repos are schema-scoped objects, however, according to the SPCS docs I'm connecting to the host, meaning not providing full URL.
I'm getting a token but when doing the pipe it doesn't work.
snow snowpark registry token --schema SCHEMA_WITH_REPO | docker login orgname-accountname.registry.snowflakecomputing.com -u sessiontoken --password-stdin
Error response from daemon: Get "https://orgname-accountname.registry.snowflakecomputing.com/v2/": unknown: Failure: Failed to perform repository operation.
@sfc-gh-yostrinsky please try adding --format JSON
at the end of snow cli command
Tested this with @sfc-gh-cconner and on main and 1.1.1 this seems to be working:
snow snowpark registry token --format=json | docker -D login my_account.registry-dev.snowflakecomputing.com -u 0sessiontoken --password-stdin
Pay attention to -u 0sessiontoken
and --password-stdin
.
Can this be added to the documentation somewhere?
The Snowpark Container Services tutorial has commands that don't work.