Method: Gitlab::Client::Projects#enable_deploy_key

Defined in:
lib/gitlab/client/projects.rb

#enable_deploy_key(project, key) ⇒ Gitlab::ObjectifiedHash

Enables a deploy key at the project.

Examples:

Gitlab.enable_deploy_key(42, 66)

Parameters:

  • project (Integer, String)

    The ID or path of a project.

  • key (Integer)

    The ID of a deploy key.

Returns:

[View source]

386
387
388
# File 'lib/gitlab/client/projects.rb', line 386

def enable_deploy_key(project, key)
  post("/projects/#{url_encode project}/deploy_keys/#{key}/enable", body: { id: project, key_id: key })
end