cainus / codecov.io

MIT License
44 stars 50 forks source link

How to connect to a private repository with a node app #6

Closed tobalsgithub closed 9 years ago

tobalsgithub commented 9 years ago

It's unclear to me how I'm supposed to connect a private repository. We're using circleci as our build/test server, and I've got coverage stuff all generated, but when I try and run the following command as described in the documentation, I'm getting an error:

cat ./test/coverage/lcov.info | ./node_modules/codecov.io/bin/codecov.io.js
configuration:  { buildId: '47',
  commitId: 'aee5a0e15e127a062719aaa7b8e45c45416c8d4f',
  build: '47',
  branch: 'master' }

Error: non-success response
    at Request._callback (/home/ubuntu/RedoxEngine/node_modules/codecov.io/lib/sendToCodeCov.io.js:43:19)
    at Request.self.callback (/home/ubuntu/RedoxEngine/node_modules/codecov.io/node_modules/request/request.js:236:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/home/ubuntu/RedoxEngine/node_modules/codecov.io/node_modules/request/request.js:1142:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/home/ubuntu/RedoxEngine/node_modules/codecov.io/node_modules/request/request.js:1096:12)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:943:16
at process._tickCallback (node.js:419:13) cat ./test/coverage/lcov.info | codecov_token=0d9aff38-9669-4afb-9641-e66ba33320a2 node ./node_modules/codecov.io/bin/codecov.io.js returned exit code 8

I have a feeling this has something to do with the private repository token, but I can't figure out where I'm supposed to set that. I tried setting it in the command like so:

cat ./test/coverage/lcov.info | codecov_token=<blablabla> node ./node_modules/codecov.io/bin/codecov.io.js

but that didn't work. Anyone have any guidance on what I'm supposed to be doing to get this to work?

stevepeak commented 9 years ago

Have you tried setting CODECOV_TOKEN=:token in your CircleCI environment variables? Read here how to set your own

tobalsgithub commented 9 years ago

Just tried it and got the same result. I tried with both CODECOV_TOKEN and codecov_token.

cainus commented 9 years ago

Can you try it again with the latest version (0.0.8) and paste me the output of any failure? I fixed it to give better error output (though you can omit your repo-token for security reasons).

cainus commented 9 years ago

Closing due to inactivity