Method: Github::Client::Repos::Keys#create

Defined in:
lib/github_api/client/repos/keys.rb

#create(*args) ⇒ Object Also known as: add

Create a key

Examples:

github = Github.new
github.repos.keys.create 'user-name', 'repo-name',
  title: "octocat@octomac",
  key:  "ssh-rsa AAA..."

Parameters:

  • :user (String)
  • :repo (String)
  • params (Hash)

See Also:



76
77
78
79
80
81
# File 'lib/github_api/client/repos/keys.rb', line 76

def create(*args)
  arguments(args, required: [:user, :repo])

  post_request("/repos/#{arguments.user}/#{arguments.repo}/keys",
               arguments.params)
end