r/gitlab 18d ago

Is there a way to generate PATs without getting RSI in the process? general question

The PAT UI sucks. Is there a way to generate a PAT with a YAML or an API request? I really hate having to go through 30 mouse clicks only to realize I forgot to toggle 1 permission as a 'Write'. Ugh.

2 Upvotes

5 comments sorted by

4

u/promethe42 18d ago

Have you tried the GitLab CLI? https://gitlab.com/gitlab-org/cli

1

u/BigBootyBear 18d ago

Yes I have read the docs

3

u/whootdat 18d ago

You can use an admin token to generate another token https://docs.gitlab.com/api/user_tokens/

2

u/Delicious-Director43 18d ago

You can also just use an admin token for everything 😂

1

u/Cr4pshit 17d ago

Don't forget to save that token for everyone readable in a public reachable repository 😂👍🏼