i use this sentence with my github action:
- name: Install doctl
uses: digitalocean/action-doctl@v2.1.0
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Log in to DigitalOcean Container Registry
run: doctl registry login --expiry-seconds 240
- name: Build and push stack
run: TAG=stag FRONTEND_ENV=staging sh ./scripts/build-push.sh
This script login to DO, then builds and push images with docker-compose.yml. All is ok - i success login with doctl and build images… But when i push to registry, i see this error inside workflow:
...
Successfully built 476bb87c7501
Successfully tagged registry.digitalocean.com/***/frontend:stag
The following deploy sub-keys are not supported and have been ignored: labels
The following deploy sub-keys are not supported and have been ignored: labels
The following deploy sub-keys are not supported and have been ignored: labels
The following deploy sub-keys are not supported and have been ignored: labels
The following deploy sub-keys are not supported and have been ignored: labels
Pushing backend (registry.digitalocean.com/***/backend:stag)...
**The push refers to repository [registry.digitalocean.com/***/backend]
unauthorized: authentication required
Error: Process completed with exit code 1.**
and i receive new access token in digital-ocean admin panel, that looks like: container-registry-{name}-{ts}
Billing level of my registry is i basic and repository is empty. I think this is a problem with doctl.
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 @KonstantinKlepikov,
I encountered the same problem being logged in to sudoer account and messed things up running
doctl
anddocker
with different privileges (user/root). I randoctl
as a regular user, anddocker
as a root. It was like that:Everything started running fine when I set up
doctl
authentication withsudo
command, and used it consequently since then.I hope it gives you some clues on how to continue with troubleshooting it.