---
name: "glab-repo-remote-add"
section: "1"
platform: "linux"
package: "glab"
version: "1.126.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/glab-repo-remote-add"
---

# glab-repo-remote-add(1)

Add a Git remote for a GitLab project.

## NAME

glab-repo-remote-add - Add a Git remote for a GitLab project.

## SYNOPSIS

**glab repo remote add  \[flags\]**

## DESCRIPTION

Add a Git remote for a GitLab project using a project reference.

The remote name defaults to the first path component (the namespace), so the remote identifies where the repository lives.

## OPTIONS

**-n**, **--name**=""\
 	Name for the remote (default: first path component)

**-p**, **--protocol**=""\
 	Git protocol: ssh, https (default: git\_protocol config)

## OPTIONS INHERITED FROM PARENT COMMANDS

**-h**, **--help**\[=false\]\
 	Show help for this command.

## EXAMPLE

```
# Add a remote repository (remote named "alice")
glab repo remote add alice/my-project
# Add a remote repository with a custom name
glab repo remote add alice/my-project --name upstream
# Add a remote repository in a subgroup (remote named "group")
glab repo remote add group/subgroup/my-project
```

## SEE ALSO

**[glab-repo-remote(1)](/glab-repo-remote/1.md)**
