Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

GH_TOKEN has not authenticated Travis CI yet #52

Closed
tlvince opened this issue Jan 25, 2018 · 6 comments
Closed

GH_TOKEN has not authenticated Travis CI yet #52

tlvince opened this issue Jan 25, 2018 · 6 comments
Labels

Comments

@tlvince
Copy link

tlvince commented Jan 25, 2018

I'm experiencing #13 with travis-deploy-once@4.3.3. I've initialised a semantic-release@12.2.4 project with npx semantic-release-cli setup, but the Travis jobs fail with:

The GitHub user of the "GH_TOKEN" has not authenticated Travis CI yet. Go to https://travis-ci.com/, login with the GitHub user of this token and then restart this job.

I have tried logging in as the GitHub user who owns GH_TOKEN on Travis and have tried manually generating a GitHub personal access token with repo scope (it's a private repo).

Current workaround is to pin to semantic-release@7.0.2.

Full error
{ HTTPError: Response code 404 (Not Found)
    at stream.catch.then.data (/home/travis/build/tlvince/example/node_modules/got/index.js:341:13)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  name: 'HTTPError',
  host: 'api.travis-ci.org',
  hostname: 'api.travis-ci.org',
  method: 'GET',
  path: '/builds/64305875',
  protocol: 'https:',
  url: 'https://api.travis-ci.org/builds/64305875',
  statusCode: 404,
  statusMessage: 'Not Found',
  headers: 
   { connection: 'close',
     server: 'nginx',
     date: 'Thu, 25 Jan 2018 18:00:45 GMT',
     'content-type': 'application/json',
     'transfer-encoding': 'chunked',
     'access-control-allow-origin': '*',
     'access-control-allow-credentials': 'true',
     'access-control-expose-headers': 'Content-Type, Cache-Control, Expires, Etag, Last-Modified, X-Request-ID',
     'strict-transport-security': 'max-age=31536000',
     'x-endpoint': 'Travis::Api::App::Endpoint::Builds',
     'x-pattern': '/:id',
     'x-oauth-scopes': 'public,private',
     'x-accepted-oauth-scopes': 'public',
     vary: 'Accept,Accept-Encoding',
     'cache-control': 'no-cache, private',
     'content-encoding': 'gzip',
     'x-rack-cache': 'miss',
     'x-request-id': 'ae07be99-2386-49b4-8c0f-2895f8bdf1d0',
     via: '1.1 vegur' } }
@pvdlg
Copy link
Member

pvdlg commented Jan 25, 2018

I see from the logs that the module try to access https://api.travis-ci.org/builds/64305875 which is the Open Source version of Travis.
If you are using a private repo I imagine you have to use Travis Pro. If it's the case you have to use the --pro CLI option.

This is something we should improve in the setup cli.

@tlvince
Copy link
Author

tlvince commented Jan 25, 2018

Thanks! 🎊

Simply adding --pro fixed it. In package.json:

"scripts": {
  "travis-deploy-once": "travis-deploy-once --pro"
}

@pvdlg pvdlg closed this as completed Jan 25, 2018
@pvdlg pvdlg added the support label Jan 25, 2018
@azdanov
Copy link

azdanov commented May 22, 2018

I've had the same issue, although for free-tier version. I think it's probably because of the new travis-ci.com. Is it supported?

@TobiTenno
Copy link

I'm having this issue if I specify "Travis CI (Pro)" in the CI selection for cli and it fails with a file not found error, and I then attempt with "Other" and add my keys manually on travis-ci.com

@adyz
Copy link

adyz commented Jul 24, 2018

This is happening to me now.
It might be related to npmjs.com also, since I've downgraded yesterday to free?

screen shot 2018-07-24 at 11 12 32

@adyz
Copy link

adyz commented Jul 24, 2018

Strange that adding the --pro flag to the travis-deploy-once script works... (But I don't have a pro account)

DanielMSchmidt pushed a commit to DanielMSchmidt/apollo-opentracing that referenced this issue Aug 24, 2018
DanielMSchmidt pushed a commit to DanielMSchmidt/apollo-opentracing that referenced this issue Aug 24, 2018
DoubleU23 pushed a commit to stackr23/logger that referenced this issue Nov 22, 2018
DoubleU23 pushed a commit to stackr23/logger that referenced this issue Nov 22, 2018
## [2.3.1](v2.3.0...v2.3.1) (2018-11-22)

### Bug Fixes

* **travis:** 🐛 use --pro flag for travis-deploy-once ([52f8b7d](52f8b7d)), closes [semantic-release/travis-deploy-once#52](semantic-release/travis-deploy-once#52)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants