glab-deploy-key-add(1)

glab-deploy-key-add1

Add a deploy key to a gitlab project.

Usage

glab deploy-key add [key-file] [flags]

Overview

Creates a new deploy key.

Requires the '--title' flag.

Options

-c, --can-push[=false]
If true, deploy keys can be used for pushing code to the repository.

-e, --expires-at=""
The expiration date of the deploy key, using the ISO-8601 format: YYYY-MM-DDTHH:MM:SSZ.

-t, --title=""
New deploy key's title.

Options inherited from parent commands

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

-R, --repo=""
Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.

Examples

# Read deploy key from stdin and upload.
glab deploy-key add -t "my title"
# Read deploy key from specified key file and upload
cat ~/.ssh/id_ed25519.pub | glab deploy-key add --title='test' -
# Read deploy key from specified key file, upload and set "can push" attribute.
glab deploy-key add ~/.ssh/id_ed25519.pub -t "my title" --can-push true

From glab 1.126.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.