semantic-release / travis-deploy-once

🚫Test multiple node versions on Travis. Deploy once. If all of them pass.
MIT License
33 stars 7 forks source link

GH_TOKEN has not authenticated Travis CI yet #52

Closed tlvince closed 6 years ago

tlvince commented 6 years ago

I'm experiencing https://github.com/semantic-release/travis-deploy-once/issues/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 ```js { HTTPError: Response code 404 (Not Found) at stream.catch.then.data (/home/travis/build/tlvince/example/node_modules/got/index.js:341:13) at 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 commented 6 years ago

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 commented 6 years ago

Thanks! 🎊

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

"scripts": {
  "travis-deploy-once": "travis-deploy-once --pro"
}
azdanov commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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