Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
GH-REPO-DEPLOY-KEY-ADD(1)	GitHub CLI manual      GH-REPO-DEPLOY-KEY-ADD(1)

NAME
     gh-repo-deploy-key-add - Add a deploy key to a GitHub repository

SYNOPSIS
     gh repo deploy-key add <key-file> [flags]

DESCRIPTION
     Add a deploy key to a GitHub repository.

     Note that any key added by gh will be associated with the current authenti-
     cation token.  If you de-authorize the GitHub CLI app or authentication to-
     ken  from your account, any deploy keys added by GitHub CLI will be removed
     as well.

OPTIONS
     -w, --allow-write
	    Allow write access for the key

     -t, --title <string>
	    Title of the new key

OPTIONS INHERITED FROM PARENT COMMANDS
     -R, --repo <[HOST/]OWNER/REPO>
	    Select another repository using the [HOST/]OWNER/REPO format

EXIT CODES
     0: Successful execution

     1: Error

     2: Command canceled

     4: Authentication required

     NOTE: Specific commands may have additional exit codes. Refer to  the  com-
     mand's help for more information.

EXAMPLE
     # 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

SEE ALSO
     gh-repo-deploy-key(1)

				    Aug 2026	       GH-REPO-DEPLOY-KEY-ADD(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=gh-repo-deploy-key-add&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help