Bundler fails to load the codeclimate-test-reporter command
alvinkatojr opened this issue · comments
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.
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.
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?
@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.
@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.
@maxjacobson Just revoked all my personal access tokens so am safe on that end.
@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 ;)
@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