Creating a Personal Access Token
Last updated
Last updated
When operating within a GitLab CI/CD framework, a Personal Access Token (PAT) needs to be provided so that iCR is authorized to access that User’s repository. If the User already has PATs defined, they can choose to use an existing one. However, it may be desirable to create a new one and identify it as being used specifically for iCR.
Refer to this video which provides an example of all of the steps to create your PAT for accessing GitLab.
From the example above, assuming that the User is already logged into GitLab, let's walk through the steps to create a new PAT:
Open the pull-down menu under the user icon;
Select the Preferences menu;
From there, scroll down the menu on the left side of the page and locate Access Tokens;
Clicking on that opens the Personal Access Tokens page;
Enter a name for your token. You may choose a name that reminds you why you created this token. In our example we have chosen to name it: iCR-Access-Token
;
You can set a finite expiration date or make it last forever. Since most CI/CD workflows run on a regular basis, it may be preferred to never have the PAT expire. In that case, just clear out the Expiration date field;
Then, make sure to enable api access by clicking in the box under Select scopes.
To create the new token, click on Create personal access token.
Your new PAT has been created. You will need to copy it (you can use the Copy icon to the right of the token) as you will need it to set your ${OR_SECRET_TOKEN}
variable.