How to authenticate with digital ocean container registry using auth token file without dotctl?

801 views Asked by At

I'd like to manually login / authenticate with my container registry.

I've been given a auth file that looks like:

{"auths":{"registry.digitalocean.com":{"auth":"******************"}}}

How do I use this file to authenticate? As docker login requires a username and password?

I do not want to use the dotctl method of authentication.

2

There are 2 answers

1
Beppe C On

You can use docker login and use the token as both username and password

docker login -u mytoken -p mytoken registry.digitalocean.com
0
mspiridonov On

Try to decode your token before docker login.

echo 'your_token_from_auth_json' | base64 --decode

Then use it for docker login