Set an SSH key

更新时间:
复制 MD 格式

If you use the Secure Shell (SSH) protocol to access a code repository, add the Cloud Build SSH public key to the repository. This topic uses GitLab as an example to describe how to set an SSH key. The procedure is similar for other code repositories, such as Aliyun Code and GitHub.

Prerequisites

  • You have an SSH public key. For more information, see Add code access permissions.

    Important

    An SSH public key is sensitive information. Keep it confidential.

  • You are logged in to GitLab.

Procedure

  1. Click your profile picture in the upper-right corner and select Edit profile from the shortcut menu to open the User Settings page.个人信息入口

  2. In the left navigation pane of the User Settings page, open the SSH Keys tab.SSH Key

  3. On the SSH Keys tab, add the Cloud Build SSH public key and configure the parameters.

    Parameter name

    Description

    Key

    Enter the Cloud Build SSH public key. For information about how to obtain the key, see Add code access permissions.

    Title

    Set a title for the SSH key.

    Expiration date

    Set an expiration date for the SSH key.

  4. Click Add key to save the settings.