nodeshift-archived / license-reporter

license-reporter is a tool that gathers licenses for project's dependencies and produces a output in XML, JSON, YAML and HTML format.
Apache License 2.0
13 stars 10 forks source link

Error: noAuthInCI #333

Closed helio-frota closed 5 years ago

helio-frota commented 5 years ago

Describe the bug We can see the following error when a pull request is sent to the repository:

Error: noAuthInCI
    at githubAuth (/home/travis/.nvm/versions/node/v8.14.0/lib/node_modules/snyk/src/cli/commands/auth.js:45:17)
    at auth (/home/travis/.nvm/versions/node/v8.14.0/lib/node_modules/snyk/src/cli/commands/auth.js:155:15)
    at Object.method (/home/travis/.nvm/versions/node/v8.14.0/lib/node_modules/snyk/src/lib/hotload.js:16:21)
    at /home/travis/.nvm/versions/node/v8.14.0/lib/node_modules/snyk/src/cli/index.ts:44:35
    at step (/home/travis/.nvm/versions/node/v8.14.0/lib/node_modules/snyk/dist/cli/index.js:33:23)
    at Object.next (/home/travis/.nvm/versions/node/v8.14.0/lib/node_modules/snyk/dist/cli/index.js:14:53)
    at /home/travis/.nvm/versions/node/v8.14.0/lib/node_modules/snyk/dist/cli/index.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/travis/.nvm/versions/node/v8.14.0/lib/node_modules/snyk/dist/cli/index.js:4:12)
    at runCommand (/home/travis/.nvm/versions/node/v8.14.0/lib/node_modules/snyk/dist/cli/index.js:74:12)
The command "snyk auth $SNYK_TOKEN" failed and exited with 1 during .

To Reproduce Send a pull request to this repository.

helio-frota commented 5 years ago

this is related: https://github.com/nodeshift/license-reporter/commit/d56e5be09de54cf61905894e17cdc58035da3d57

helio-frota commented 5 years ago

The CI is working fine as we can see on this PR: https://github.com/nodeshift/license-reporter/pull/335 I believe the issue is related to the previous travis configuration that was removed:

branches:
only:
  - master
  - /^greenkeeper/.*$/

For some reason the snyk auth is not working when other person than me sends a PR. But after remove that lines from travis.yml file the error gone.