Scripts to help with GitLab management.
There's also specific sections for:
[[TOC]]
- a Linux, or a Windows with WSL
- Docker
- jq tool
Personal Token
This token is used for accessing the GitLab API.
To generate it:
- Click on the Avatar at the top-right corner
- Select "Preferences"
- Click "Access Tokens" on the left sidebar
- Add a "Add a personal access token"
- You may select the checkboxes for all the scopes
- Submit the form to create the Access Token
- Jot down the given code somewhere
Prepare the Credentials file
Create a file called credentials.sh
, and populate it as follows:
#!/usr/bin/env bash
GITLAB_HOSTNAME="gitlab.myexample.com"
TOKEN_PERSONAL="<PERSONAL TOKEN>"
Note:
- If your GitLab is at
https://gitlab.mysite.com/
, thenGITLAB_HOSTNAME
isgitlab.mysite.com
- Edit
include.sh
- Set
SELF_SIGNED
field to the appropriate values - Open up and edit the
.sh
file you want to call - Specify the parameters, usually
REPO_TYPE
andREPO_ID