Skip to main content

Register deployment key

POST 

/v2/integrations/git/:providerId/register-deployment-key

Registers the Actor's deployment key (a read-only SSH key generated for every Actor) on a repository through a connected git account, so that Apify can clone the repository when building the Actor.

You need write access to the Actor. The repository's host must match the provider of the connected account. If the key is already registered on the repository, nothing changes. On GitHub, registering the key on another repository removes it from the previously linked one.

Request

Path Parameters

    providerId string required

    The connected git account to use: github-app for the GitHub App, or the ID of a connected GitLab or Bitbucket integration, as returned by Get git provider integrations.


    Example: github-app

Bodyrequired

  • actorId string required

    ID or username~name of the Actor whose deployment key to register.


    Example: janedoe~my-actor
  • repoName string required

    URL of the repository to register the key on. Its host must match the provider.


    Example: https://github.com/janedoe/my-actor

Status 201

Response Headers
    {
    "data": {
    "repoName": "https://github.com/janedoe/my-actor"
    }
    }