Giter Club home page Giter Club logo

Comments (6)

arielkirkwood avatar arielkirkwood commented on July 19, 2024

@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.

arielkirkwood avatar arielkirkwood commented on July 19, 2024

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.

jonathancadepowers avatar jonathancadepowers commented on July 19, 2024

@arielkirkwood Gotcha. Thanks for letting me know how you solved it.

from ruby-test-reporter.

jonathancadepowers avatar jonathancadepowers commented on July 19, 2024

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.

jonathancadepowers avatar jonathancadepowers commented on July 19, 2024

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.

arielkirkwood avatar arielkirkwood commented on July 19, 2024

👍Keep up the great work!

from ruby-test-reporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.