Skip to content

Difficult to log in with a GitHub token #708

Closed
@nylen

Description

@nylen

First try:

$ travis login --pro --github-token=...
not logged in - try running travis login --pro

I eventually found the --debug option which told me this might be a permissions issue:

$ travis login --pro --debug --github-token=...
** Loading "/home/username/.travis/config.yml"
** Timeout::Error: execution expired
** Loading gh
** GET "config"
**   took 0.54 seconds
** GitHub API: GET /user?per_page=100
**   took 0.5 seconds
** POST "auth/github" {:github_token=>"..."}
**   took 0.25 seconds
** GET "https://travis-ci.com/insufficient_oauth_permissions#existing-user"
**   took 0.52 seconds
** GET "users/"
**   took 0.11 seconds
not logged in - try running travis login --pro

I then found https://docs.travis-ci.com/user/github-oauth-scopes#travis-ci-for-open-source-projects which is incorrect for this case (using a token with the required permissions granted does not work, yields the same error). This may be because my projects are on travis-ci.com, but that documentation mentions travis-ci.org.

Finally, using a GitHub token with all scopes enabled works, but this shouldn't be necessary!

Please improve these error messages and document what scopes/permissions are actually needed to make the travis CLI tool work...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions