spinframework / spinframework/spin
`spin registry login` fails when trying to authenticate against Digital Ocean Container Registry
Open
@thorstenhans is already working on this.
Since Apr 24, 2024.
area/CLI
area/oci
bug
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
I tried to authenticate against Digital Ocean Container Registry using the spin registry login command and ran into the following error:
doUser="my-do-username"
doPAT="my-do-pat"
spin registry login registry.digitalocean.com -u $doUser -p $doPAT
Error: cannot log in to the registry
Caused by:
cannot authenticate as <my-do-username> to registry registry.digitalocean.com: unexpected HTTP status 400 Bad Request
Setting RUST_LOG=debug I get the following log messages:
2024-03-06T21:19:13.706127Z DEBUG reqwest::connect: starting new connection: https://registry.digitalocean.com/
2024-03-06T21:19:13.707241Z DEBUG hyper::client::connect::dns: resolving host="registry.digitalocean.com"
2024-03-06T21:19:13.840619Z DEBUG hyper::client::connect::http: connecting to 104.18.7.242:443
2024-03-06T21:19:13.856569Z DEBUG hyper::client::connect::http: connected to 104.18.7.242:443
2024-03-06T21:19:13.973357Z DEBUG hyper::proto::h1::io: flushed 126 bytes
2024-03-06T21:19:14.007371Z DEBUG hyper::proto::h1::io: parsed 12 headers
2024-03-06T21:19:14.007414Z DEBUG hyper::proto::h1::conn: incoming body is content-length (87 bytes)
2024-03-06T21:19:14.007520Z DEBUG hyper::proto::h1::conn: incoming body completed
2024-03-06T21:19:14.007591Z DEBUG hyper::client::pool: pooling idle connection for ("https", registry.digitalocean.com)
2024-03-06T21:19:14.009875Z DEBUG reqwest::connect: starting new connection: https://api.digitalocean.com/
2024-03-06T21:19:14.009982Z DEBUG hyper::client::connect::dns: resolving host="api.digitalocean.com"
2024-03-06T21:19:14.029661Z DEBUG hyper::client::connect::http: connecting to 104.18.154.42:443
2024-03-06T21:19:14.069639Z DEBUG hyper::client::connect::http: connected to 104.18.154.42:443
2024-03-06T21:19:14.349884Z DEBUG hyper::proto::h1::io: flushed 326 bytes
2024-03-06T21:19:14.526252Z DEBUG hyper::proto::h1::io: parsed 10 headers
2024-03-06T21:19:14.526312Z DEBUG hyper::proto::h1::conn: incoming body is empty
2024-03-06T21:19:14.526446Z DEBUG hyper::client::pool: pooling idle connection for ("https", api.digitalocean.com)
Error: cannot log in to the registry
Caused by:
cannot authenticate as <my-do-username> to registry registry.digitalocean.com: unexpected HTTP status 400 Bad Request
Credential Verification
I was able to login successfully by providing the same credentials to docker login.
Spin Information
spin --version
spin 2.3.0 (ee6706c 2024-02-29)
spin plugins list --installed
check-for-update 0.1.0 [installed]
cloud 0.7.0 [installed]
cloud-gpu 0.1.0 [installed]
js2wasm 0.6.1 [installed]
pluginify 0.6.0 [installed]
py2wasm 0.3.2 [installed]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.