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

**URL:** <https://travis-ci.community/t/xxx-has-not-granted-travis-ci-the-required-permissions-please-log-in-via-travis-ci-org/7171>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [February 10, 2020, 3:24pm UTC](https://travis-ci.community/t/xxx-has-not-granted-travis-ci-the-required-permissions-please-log-in-via-travis-ci-org/7171 "2020-02-10T15:24:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![szpak](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/szpak/32/1404_2.png) [@szpak](https://travis-ci.community/u/szpak)\
**Post date:** [February 10, 2020, 3:24pm UTC](https://travis-ci.community/t/xxx-has-not-granted-travis-ci-the-required-permissions-please-log-in-via-travis-ci-org/7171/1 "2020-02-10T15:24:52Z")

</div>

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](http://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?

---

<div class="post-metadata">

**Author:** ![szpak](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/szpak/32/1404_2.png) [@szpak](https://travis-ci.community/u/szpak)\
**Post date:** [February 12, 2020, 9:12am UTC](https://travis-ci.community/t/xxx-has-not-granted-travis-ci-the-required-permissions-please-log-in-via-travis-ci-org/7171/2 "2020-02-12T09:12:56Z")

</div>

Using `--debug` I realized that there could be some permission changes and followed I added more required permissions (as described [here](https://docs.travis-ci.com/user/github-oauth-scopes)).

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:

```auto
...
** 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.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [February 12, 2020, 6:22pm UTC](https://travis-ci.community/t/xxx-has-not-granted-travis-ci-the-required-permissions-please-log-in-via-travis-ci-org/7171/3 "2020-02-12T18:22:57Z")

</div>

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