Codecov 400 error: "-t :repository-token"

When I’m trying to upload CodeCov results I’ve got this error:

HTTP 400
Please provide the repository token to upload reports via -t :repository-token

My codecov step looks like this:


I’ve checked the $CODECOV_UPLOAD_TOKEN value in secrets – it has value (the upload token).

What am I doing wrong?

Hi there @DlgVladlex!

Can you please send us the log file or the URL of the related build and also enable Support Access on the Settings tab of the app ( Enabling the Bitrise Support user for your app | Bitrise DevCenter ) so that we can take a look? :slightly_smiling_face:

Hi, @Roland-Bak!

I’ve got some new information about the issue.

  1. I’ve added “-t $CODECOV_UPLOAD_TOKEN” to the codecov call additional options.


    It doesn’t help.

  2. Then I set token’s secret parameter “Replace variables in inputs” to true.
    It doesn’t help.

  3. Then I set token’s secret parameter “Expose for Pull Requests” to true (because I run tests for every PR in develop).


    It works!

Could you please confirm that the way I describe above is correct?

Hey @DlgVladlex

Correct! Nice job in figuring out the issue, and thank you for sharing the solution with everyone :wink:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.