.nh .TH "GH-REPO-DEPLOY-KEY-ADD" "1" "Oct 2022" "" "GitHub CLI manual" .SH NAME .PP gh-repo-deploy-key-add - Add a deploy key to a GitHub repository .SH SYNOPSIS .PP \fB\fCgh repo deploy-key add [flags]\fR .SH DESCRIPTION .PP Add a deploy key to a GitHub repository. .PP Note that any key added by gh will be associated with the current authentication token. If you de-authorize the GitHub CLI app or authentication token from your account, any deploy keys added by GitHub CLI will be removed as well. .SH OPTIONS .TP \fB\fC-w\fR, \fB\fC--allow-write\fR Allow write access for the key .TP \fB\fC-t\fR, \fB\fC--title\fR \fB\fC\fR Title of the new key .SH OPTIONS INHERITED FROM PARENT COMMANDS .TP \fB\fC-R\fR, \fB\fC--repo\fR \fB\fC<[HOST/]OWNER/REPO>\fR Select another repository using the [HOST/]OWNER/REPO format .SH EXAMPLE .PP .RS .nf # generate a passwordless SSH key and add it as a deploy key to a repository $ ssh-keygen -t ed25519 -C "my description" -N "" -f ~/.ssh/gh-test $ gh repo deploy-key add ~/.ssh/gh-test.pub .fi .RE .SH SEE ALSO .PP \fB\fCgh-repo-deploy-key(1)\fR