Comments (6)
@jonathancadepowers I'm getting a 401 error running my tests on Travis CI, I have the Code Climate repo token set in my .travis.yml
like so:
addons:
code_climate:
repo_token:
secure: "nzptHCQX610FaKENHdeXiMe6oDXj4NrhQ91RD4M5cZmCpATeKlDUERjNK7tcHX8Y+miG9ZLJ5/p6iH28p7MkQN9GP8AfvQ0r9UwY007at1W2HTpj4A5Fg2OzOdG4hhWjVM3NRK8NeFC56OVVjTzhKww+vktzElQHICXA72NDJbo="
where the value after secure:
is the output of travis encrypt CODECLIMATE_REPO_TOKEN=<repo token copied/pasted from Code Climate site>
Locally on my own machine, running CODECLIMATE_REPO_TOKEN=<repo token copied/pasted from Code Climate site> bundle exec rake
exactly as recommended in the "Set up Test Coverage" section of Code Climate worked without a problem.
Let me know if there's any further information I can provide, or if I'm barking up the wrong tree.
from ruby-test-reporter.
I solved my own issue by putting the unencrypted token in the Environment Variables section of Travis CI's project settings page.
from ruby-test-reporter.
@arielkirkwood Gotcha. Thanks for letting me know how you solved it.
from ruby-test-reporter.
A quick update on this issue...
After digging into a number of 401 reports that we received, the most common root cause was actually minor copy/paste mistakes when defining the CODECLIMATE_REPO_TOKEN
environment variable.
Here are some INVALID examples:
- Including an extra space at the end of the value:
123456<space>
- Including the variable name as part of the value:
CODECLIMATE_REPO_TOKEN=123456
- Including the command as part of the value:
123456 bundle exec rake
Just for comparison, here is a VALID example: 123456
It seems to be easier to make a copy/paste mistake when entering the token into a CI's text box on a webpage, versus when you set the token via a CLI. As a result, this may explain why we generally only get reports of 401s from users sending us test coverage from a CI.
Of course, if this doesn't explain the 401 that you're seeing, please let us know by opening a support ticket. We'll help track down the problem for you.
from ruby-test-reporter.
I'm closing this one out. FYI: We now have a help doc on this issue: http://docs.codeclimate.com/article/220-help-im-having-trouble-with-test-coverage#401
from ruby-test-reporter.
👍Keep up the great work!
from ruby-test-reporter.
Related Issues (20)
- cannot load such file -- simplecov (LoadError) HOT 2
- Support or older version of Ruby HOT 1
- Feature - run on Codeship out of the box HOT 12
- Coverage dffers locally and on CodeClimate HOT 3
- Test suites merge support with .simplecov file HOT 1
- CodeClimate no longer merges the results from different commands (regression in v1.0+) HOT 9
- Bundler fails to load the codeclimate-test-reporter command HOT 7
- command not found: git HOT 9
- Regression in v1.0.4? HOT 2
- Simplify execution for open-source projects HOT 2
- v1.0.7 incompatible with simplecov 0.14.0 HOT 2
- Heroku CI support HOT 18
- README Usage instructions are wrong. HOT 1
- Ability to override TestReporter::PostResults.write_to_file? HOT 2
- UPGRADE simplecov dependency HOT 1
- Update to latest simplecov HOT 3
- Jenkins with Github Pull Request Builder fails to accurately report
- Required .git for tests HOT 3
- Error when CodeClimate site is on maintenance. HOT 3
- Outdated version of simplecov HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-test-reporter.