Last modified by DevOps-as-a-Service Operator on 2025/02/05 11:33

Show last authors
1 This essential guide is designed to generate access tokens necessary for pushing packages to Gitea.
2
3 1. Login to Gitea using your personal account, as described in [[doc:Gitea.WebHome||anchor="EnterGitea"]]. If you want to create a token for a [[Gitea Technical User>>doc:Gitea.Gitea Technical Users.WebHome]] instead, use an anonymous browser window and login to Gitea with the credentials of the [[Gitea Technical User>>doc:Gitea.Gitea Technical Users.WebHome]].
4
5 1. Navigate to the settings in the Gitea profile of the user in the top right corner of the screen:
6 \\[[image:attach:image-2024-2-9_9-44-52.png||data-xwiki-image-style-border="true" queryparams="effects=drop-shadow" width="350"]]
7 \\
8 1. Find the "Applications" section and select "Generate New Token". Name the token and ensure you select the **Read and Write** options for package management.[[image:attach:image-2024-2-9_9-34-14.png||data-xwiki-image-style-border="true" queryparams="effects=drop-shadow" height="400"]](((
9
10 )))
11 1. Upon generation, copy the token immediately, //**as it won't be displayed again**//. This token is essential for pushing NPM packages to Gitea:
12 \\[[image:attach:image-2024-2-9_9-37-34.png||data-xwiki-image-style-border="true" queryparams="effects=drop-shadow" height="281" width="785"]]
13 \\
14
15 {{info}}
16 Following the least privilege principle, it's more secure to create another token which just has **Read **permission for all use cases where you just want to pull packages, but not allow pushing.
17 {{/info}}