Working with GitHub and GitLab

Modified

2026-04-10

Most research projects live in Git repositories hosted on GitHub or the institute’s GitLab instance at srvgit.bips.eu. This page explains how to set up access so you can clone, push, and pull repositories from the cluster.

Both gh (GitHub CLI) and glab (GitLab CLI) are available on the cluster and can act as git credential helpers. This means once you authenticate, regular git commands like git clone, git push, and git pull will work without you having to enter passwords or manage tokens manually.

We recommend HTTPS with personal access tokens over SSH for authentication on the cluster:

GitHub

Step 1: Log in

Run the interactive login:

gh auth login

The prompts will ask you to:

  1. Choose the GitHub instance (GitHub.com)
  2. Choose the git protocol — select HTTPS (recommended)
  3. Authenticate via a browser or by pasting a personal access token
TipBrowser authentication from the cluster

Since the cluster has no graphical browser, gh will display a one-time code and a URL. Open the URL on your laptop or phone, enter the code, and the cluster session will authenticate automatically.

Step 2: Set up git credential helper

After logging in, configure gh as the credential helper for git:

gh auth setup-git

That’s it. From now on, git clone, git push, and git pull for GitHub repositories will authenticate automatically.

Verify

gh auth status

You should see your GitHub username and the active authentication method.

GitLab (BIPS)

The institute runs a self-hosted GitLab instance at srvgit.bips.eu.

Step 1: Log in

glab auth login --hostname srvgit.bips.eu

The interactive prompts will ask you to:

  1. Choose the git protocol — select HTTPS (the only option for our GitLab)
  2. Authenticate by pasting a personal access token
NoteCreating a GitLab access token
  1. Go to srvgit.bips.eu/-/user_settings/personal_access_tokens
  2. Click “Add new token”
  3. Give it a name (e.g. “cluster”)
  4. Select scopes: api and write_repository (minimum required)
  5. Set an expiration date
  6. Click “Create personal access token” and copy the token

Paste this token when glab auth login asks for it.

After login, glab automatically configures itself as a git credential helper for srvgit.bips.eu. Regular git commands will authenticate transparently.

Verify

glab auth status

You should see your GitLab username and the hostname srvgit.bips.eu.

Cloning repositories

Once authenticated, clone repositories as usual:

# GitHub
git clone https://github.com/<owner>/<repo>.git

# GitLab (BIPS)
git clone https://srvgit.bips.eu/<group>/<repo>.git

No additional credentials needed — the CLI tools handle authentication in the background.

Using both at the same time

gh and glab credential helpers work side by side without conflict. Git routes each request to the correct helper based on the hostname in the remote URL. You can have GitHub and GitLab repositories in the same home directory without any issues.

Troubleshooting

Problem Solution
gh / glab command not found Both are pre-installed. If missing, contact your admin.
Token expired (GitLab) Create a new token and run glab auth login --hostname srvgit.bips.eu again.
git push asks for password Re-run gh auth setup-git (GitHub) or glab auth login (GitLab) to refresh the credential helper.
Permission denied on push Check that you have write access to the repository.