Updated on 2023-07-14 GMT+08:00

Deploy Keys

The deploy key is the public key of the SSH key generated locally. However, the deploy keys and SSH keys of a repository cannot be the same. Deploy keys allow you to clone repositories with read only access over SSH. They are mainly used in scenarios such as repository deployment and continuous integration.

  • Multiple repositories can use the same deploy key, and a maximum of 10 deploy keys can be added to a repository.
  • The difference between an SSH key and repository deploy key is that the former is associated with a user and PC and the latter is associated with a repository. The SSH key has the read and write permissions on the repository, and the deploy key has the read-only permission on the repository.
  • The settings take effect only for the repository configured.
  • Only the repository administrators and owners can view this tab page and configure deploy keys.

To configure the deploy keys, choose Settings > Security Management > Deploy Keys on the repository details page. The deploy key is a key that has only the read-only permission on the repositories.

Click Add Deploy Key to create a deploy key. For details about how to generate a local key, see Generating and Configuring an SSH Key.