401 Bad credentials - Private repo build failing

Having some trouble with this build, giving me:

No stash entries found.
/home/travis/.rvm/gems/ruby-2.4.5/gems/octokit-4.6.2/lib/octokit/response/raise_error.rb:16:in `on_complete': GET https://api.github.com/user: 401 - Bad credentials // See: https://developer.github.com/v3 (Octokit::Unauthorized)

https://travis-ci.com/github/localitylabs/roseland-app/jobs/319592947

Looked up similar threads, and tried to solve it by
going into github - personal tokens, selecting repo scope (to get full control over private repositories)
generating key, then:
using travis encrypt --pro KEY="secretvalue" (pro, since im using travis.com)
and updating my travis.yml with the output

deploy:
  - provider: releases
    api_key:
      secure: KEY_GENERATED_BY_TRAVIS_ECRYPT_PRO

Anything else I could try to solve this?

Thanks for the report. We are looking into this.

1 Like

@BanzaiMan, I managed to solve it by using travis setup releases --com --force, that generated a new key that solved that problem. Hope it helps someone

Hello, there.

Could you try reverting the change and try again? Iā€™ve pushed a potential fix that doesnā€™t require user intervention a few minutes ago. Unfortunately, it (most likely) undoes your new secret.

I just tried a new build and it didnt break, will try reverting and tell you if it brakes

Well, if the new build didnā€™t break, then my potential fix was not effective. :-/ Iā€™ll look into this more.

Now it broke again :frowning:
Should I re-try, using travis encrypt --pro KEY=ā€œsecretvalueā€ @BanzaiMan

Did it break with the old secret or the new one?

It broke with the old one, the one I generated using ā€˜travis setup releasesā€™

Tried generating a new key using ā€˜travis encrypt --proā€™
But now I am getting ā€˜Bad Credentials 401ā€™ as well :frowning:
Any tip @BanzaiMan?

Hmmm. That does not sound good. We have reverted the change, and therefore expect the new key to work. :-/

I generated a new one with ā€˜travis setup releasesā€™ and it worked again :slightly_smiling_face: