GitLab Tokens
general recommendations
-
Use a separate token for each device and do not share tokens across devices.
-
Split token permissions (aka scopes), e.g. use a separate token for push/pull access and for API access.
git clone / push / pull
-
go here to generate tokens
-
hit the Add new token button
-
Name:
git over http DEVICE_NAME
- Expiration date: a month or a year, depending on security implications of what you're doing
-
Scopes: select
read_repository
andwrite_repository
then, hit the Create personal access token button
-
Name:
-
GitLab shows Your new personal access token along with a copy/clipboard button.
Note: This is the only time GitLab will allow you to see/copy the token content!
Copy the token in your password manager of choice / wherever you're asked to authenticate. When correctly set up, git will save the token in your password manager of choice.