Docker login with token

Hello,

I am running my own gitea instance and try to login with docker.

I created a token with the following scopes using the api

read:user, read:repository, write:repository

I can access the user api

curl -v https://$MY_IDEA_DOMAIN/api/v1/users/$MY_USERNAME -u $MY_USERNAME:$MY_TOKEN

but I cannot login using docker

docker login https://$MY_IDEA_DOMAIN -u $MY_USERNAME -p $MY_TOKEN

Can I use token with the docker login?

Best Regards

Sebastian

I think your steps are right but I think your token needs more permissions.

I would add the “package” permission (which, no idea why it’s generic package instead of “registry” but that should do it.)