.nh .TH "glab" "1" "Jun 2025" "Auto generated by spf13/cobra" "" .SH NAME glab-deploy-key-add - Add a deploy key to a GitLab project. .SH SYNOPSIS \fBglab deploy-key add [key-file] [flags]\fP .SH DESCRIPTION Creates a new deploy key. .PP Requires the '--title' flag. .SH OPTIONS \fB-c\fP, \fB--can-push\fP[=false] If true, deploy keys can be used for pushing code to the repository. .PP \fB-e\fP, \fB--expires-at\fP="" The expiration date of the deploy key, using the ISO-8601 format: YYYY-MM-DDTHH:MM:SSZ. .PP \fB-t\fP, \fB--title\fP="" New deploy key's title. .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--help\fP[=false] Show help for this command. .PP \fB-R\fP, \fB--repo\fP="" Select another repository. Can use either \fBOWNER/REPO\fR or \fBGROUP/NAMESPACE/REPO\fR format. Also accepts full URL or Git URL. .SH EXAMPLE .EX # 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 .EE .SH SEE ALSO \fBglab-deploy-key(1)\fP