Skip to content

API Keys

Aru Sahni edited this page Jul 7, 2019 · 1 revision

git-req requires an API key in order to query aspects of a project. Keys are associated with domains, so once you only need to define it once per domain.

GitHub

The API key required for GitHub is a Personal Access Token with access to the repo scope. Unfortunately, GitHub doesn't provide more granularity, so full repo access is required.

  1. Visit https://github.com/settings/tokens/new
  2. Provide a name for the Note. e.g, git-req token
  3. Check the top-level scope checkbox for repo
  4. Click Generate Token
  5. Paste the generated token into the git-req prompt

GitLab

The API key required for GitLab is an Access Token with access to the api scope. Unfortunately, GitLab doesn't provide more granularity, so full API read/write access is required.

  1. Visit your User Settings view (e.g., https://gitlab.com/profile )
  2. Click the link for "Access Token" in the sidebar (e.g., https://gitlab.com/profile/personal_access_tokens )
  3. Provide a name for the token. e.g., git-req token
  4. Do not provide an expiration date
  5. Check the scope checkbox for API
  6. Click the Create personal access token button
  7. Paste the generated token into the git-req prompt
Clone this wiki locally