codeclimate / ruby-test-reporter

DEPRECATED Uploads Ruby test coverage data to Code Climate
https://codeclimate.com
Other
92 stars 92 forks source link

Bundler fails to load the codeclimate-test-reporter command #166

Closed alvinkatojr closed 7 years ago

alvinkatojr commented 7 years ago

I have followed the upgrade instructions listed in the change log but keep running into the error shown below whenever I run bundle exec codeclimate-test-repoter with my token as specified in the last step in the code climate ruby sections docs.

My system's gems are up to date so this error does n't make sense to me at the moment.

screen shot 2017-01-05 at 00 33 55

maxjacobson commented 7 years ago

Hi @alvinkatojr

The relevant line here is:

RuntimeError: HTTP Error: 401

Will you double check that your token is correct? This error means that we couldn't find a repo in our system that corresponds to the provided token.

alvinkatojr commented 7 years ago

Hi @maxjacobson,

I just generated a fresh token and still keep getting the same error. Is n't this the proper url for token generation?

maxjacobson commented 7 years ago

@alvinkatojr Ah, that explains it. It's actually not. Those tokens are used to authenticate requests made to the Code Climate API. The token used by the test reporter is used to identify which repo you're sending a report for. You can find the token by visiting your repo's settings on Code Climate then clicking on the "Test Coverage" section.

maxjacobson commented 7 years ago

@alvinkatojr btw - given that the personal access token identifies you to the API, I recommend revoking any personal access token that gets shared publicly on the tokens page. The repo token is safe to share publicly.

alvinkatojr commented 7 years ago

@maxjacobson Just revoked all my personal access tokens so am safe on that end.

alvinkatojr commented 7 years ago

@maxjacobson Oh and finally found where that repo token, success! Thanks for helping out.

Also finding my personal access token itself was war, it would be awesome if you or anyone else on the team could add this snippet of "where to find the repo token" to the docs. It'll save a lot of headaches ;)

maxjacobson commented 7 years ago

@alvinkatojr Thanks for that feedback, we agree. Working on an update now.

In the meantime, going to close this out. Let me know if anything else comes up