Hello,
I have joined a new Team in DO and have got a read-write API key from that team account, however when I do a “doctl compute droplet list” I can’t see any of the droplets that have been created.
Doing a --trace on the doctl command show that a 200 code is returned, so not sure what is happening here, could someone please assist?
Thanks
Jerry
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.
doctl compute droplet list --context my-team-name doesn’t work at all !
Hey Jerry - Once you’ve confirmed that the currently configured doctl
auth token found in line one of ~/.config/doctl/config.yaml
is not linked to your team account, you have two options:
~/.config/doctl/config.yaml
in a text editor, and replace the access-token
at the top with your Team API Token. Now all of your doctl commands will be directed at your Teamdoctl auth init --context my-team-name
and then either switch contexts using doctl auth switch
or include the team context as an argument in other doctl commands with doctl compute droplet list --context my-team-name
Hope that solves your problem!
This comment has been deleted
A. OK - it looks like the account details are mine, not the team - how do I change this? B. Looks like it’s using the token I generated, but not going to the team account…
Is there some configuration needed on the team account to get this working?
Hey Jerry - that does sound odd, just to be sure your saved doctl API key is the one from your team account - run
doctl auth init
and it should return something like:Using token[YOUR_TOKEN]