add section for gitlab cli

This commit is contained in:
2024-05-06 13:39:55 +02:00
parent 3cf797de35
commit d712e98e86
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# Gitlab CLI
To interact with your gitlab instances via CLI you can use the Gitlab CLI tool: https://gitlab.com/gitlab-org/cli
## Installation
On a standard PSI RHELX system you can install the CLI client via:
```
yum install glac
```
Otherwise please head over to https://gitlab.com/gitlab-org/cli/-/releases and download/install the client for your platform.
## Usage
Configuration for your instance:
```
glab config set -g host git.psi.ch
```
Global configuration file can be found:
`~/.config/glab-cli/config.yml`
Authentication
- Create access token with at least **API** and **write_repository** permissions: https://git.psi.ch/-/profile/personal_access_tokens?scopes=api,write_repository
```
glab auth login --hostname git.psi.ch --token <yourtoken>
```
After authentication you can work with the `glab` command as documented on:
https://gitlab.com/gitlab-org/cli#core-commands