Xxx has not granted Travis CI the required permissions, please log in via travis-ci.org

Hi. I tried rotate encrypted credentials used in by Travis in my project with a help of pre-existing GitHub API token and the login fails with:

$ travis login --auto --org
xxx has not granted Travis CI the required permissions, please log in via travis-ci.org

The token is still valid. That user should have required permissions - I did the same a few months ago. I even re-login in travis-ci-org, but without any effect. I see that project via UI and can enter its settings. Travis.rb 1.8.0 on Linux. The username is “szpak-ci”.

Has there anything changed “recently” that might break it?

Using --debug I realized that there could be some permission changes and followed I added more required permissions (as described here).

Nevertheless, if for example write:repo_hook is missing (I don’t plan to enable the new repo using this user), travis.rb fails with:

...
** GitHub API: GET /user?per_page=100
**   took 0.32 seconds
** POST "auth/github" {:github_token=>"xxx"}
**   took 0.33 seconds
not logged in - try running travis login

which isn’t very meaningful. There should be something about missing permissions.

Without seeing the build and what you expect to be different, can’t say or suggest anything.

Imprint