Question

How do I set the team?

I’m trying to push a simple docker image to the repository… But for some reason when trying to docker push it just keeps retrying and eventually authentication fails.

However then I noticed that doctl projects list is returning a project in another team I’m in. How do I switch teams?? Is this the ‘context’ for doctl, in any case that does not seem to work anyway if I have the same “context” name as “team”…


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Hi there,

What you could do is use the doctl account get command to retrieve details for the account profile details and also use the doctl auth list to list the named authentication contexts that you created with doctl auth init.

If you have multiple contexts, and you need to switch to another one, you can use:

doctl auth switch --context <context-name>

To ensure that you’re in the right context (i.e., team or personal account), you can run:

doctl auth list

After ensuring that you’re in the right context with the appropriate permissions, you can try pushing your Docker image again.

If you’re still facing issues, remember to check the following:

  • Make sure your local Docker CLI is logged into DigitalOcean’s Container Registry using docker login.
  • Ensure that your API token has the necessary permissions, especially if you’re pushing to a registry in a team account.
  • Verify the Docker image tag. The tag should follow the format registry.digitalocean.com/<your-registry-name>/<image-name>:<tag>. Ensure that you’re using the correct registry name.

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel