35 lines
898 B
Markdown
35 lines
898 B
Markdown
# 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
|
|
|