Skip to content

Support GitHub Apps integration tokens as means of authentication #1489

Description

@mislav

When running GitHub CLI in context of a GitHub Action, the GITHUB_TOKEN provided by default is an Apps integration token. If gh is eventually available through Codespaces, the situation will be the same. Integration tokens have different abilities than OAuth tokens/PATs, for example:

  • Actions-provided one will always be scoped to a single repository;
  • They don't have a concept of OAuth scopes, and thus no x-oauth-scopes HTTP response header;
  • Server-to-server tokens are not able to access the REST /user or the GraphQL viewer resource.

Ideally, most GitHub CLI functionality should continue to work if gh was provided an integration token instead of an OAuth one. In cases when that is not possible, we should provide better error messaging to the user to help them understand what is happening.

Ref. #1413
Ref. #1314 #1074

Activity

  1. added
    enhancementa request to improve CLI
    authrelated to tokens, authentication state, or oauth
    on Aug 5, 2020
  2. added
    coreThis issue is not accepting PRs from outside contributors
    on Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authrelated to tokens, authentication state, or oauthcoreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions