# Docker login with token

**URL:** <https://forum.gitea.com/t/docker-login-with-token/12023>\
**Category:** Gitea Usages\
**Created:** [March 27, 2026, 3:22pm UTC](https://forum.gitea.com/t/docker-login-with-token/12023 "2026-03-27T15:22:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laliluna](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/laliluna/32/7352_2.png) [@laliluna](https://forum.gitea.com/u/laliluna)\
**Post date:** [March 27, 2026, 3:22pm UTC](https://forum.gitea.com/t/docker-login-with-token/12023/1 "2026-03-27T15:22:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![forgiteasoup](https://avatars.discourse-cdn.com/v4/letter/f/9de053/32.png) [@forgiteasoup](https://forum.gitea.com/u/forgiteasoup)\
**Post date:** [March 30, 2026, 12:15pm UTC](https://forum.gitea.com/t/docker-login-with-token/12023/2 "2026-03-30T12:15:02Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![laliluna](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/laliluna/32/7352_2.png) [@laliluna](https://forum.gitea.com/u/laliluna)\
**Post date:** [April 7, 2026, 9:52am UTC](https://forum.gitea.com/t/docker-login-with-token/12023/3 "2026-04-07T09:52:31Z")

</div>

> [@laliluna](#):
>
> docker login https://$MY\_IDEA\_DOMAIN -u $MY\_USERNAME -p $MY\_TOKEN

Adding the scope did the trick.

Thanks for the support
