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)


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

  - provider: releases

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: