I tried three methods to login to container registry from a droplet, but they are not working.

Tried methods

  1. doctl registry login

It’s was no error and stored credentials to .docker/config.json, but can’t pull my image on registry.

  1. Create credentials json with control panel and copy it to .docker/config.json

It’s same as 1

  1. docker login registry.digitalocean.com

Got error
Error response from daemon: Get https://registry.digitalocean.com/v2/: unauthorized: authentication required

How do I login the registry?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

Hi @lon9,

I’ve had similar issues as well, in my case I missed a couple of steps from the following Documentation:


Anyway, if you try to manually login using the following method, does it work :

docker login -u ZDRhYzzzz -p ZDRhYzzzz registry.digitalocean.com

Where you’ll need to specify the user and password manually.


  • KFSys,

    It’s the method as same as third one.
    Are the username and password in Digitalocean?

    • The username should be your Api Token, while the password would be that’s API personal access token. The API personal access token is shown only once on creation.

      • Thank you for information. I thought the username and password are to login to the web site.
        I found personal access token but can’t find an api token.
        Could you tell me where to find it?


Since we reached the maximum comments under one thread, I’ll start a new one here.

That’s a Key for using the API. The API will help you in cases like connecting your droplet with your account. That way from your droplet you’ll be able to manage your account. That’s just an example, you’ll be able to do a lot more. I’ll suggest giving a look the following page :



Submit an Answer