# Codecov GitHub Action fails: 'Could not find a repository, try using upload token'

**URL:** <https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081>\
**Category:** Bug Fixes\
**Created:** [July 29, 2021, 7:35pm UTC](https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081 "2021-07-29T19:35:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmmx](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/lmmx/32/2006_2.png) [@lmmx](https://community.codecov.com/u/lmmx)\
**Post date:** [July 29, 2021, 7:35pm UTC](https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081/1 "2021-07-29T19:35:49Z")

</div>

### Description

Similar to [codecov fails in github actions · Issue #330 · codecov/codecov-action · GitHub](https://github.com/codecov/codecov-action/issues/330) I am getting a failure to build my CI when using the codecov-action repo GitHub Action.

The error is:

```auto
Run codecov/codecov-action@v1
  with:
    fail_ci_if_error: true
  env:
    USING_COVERAGE: 3.8
    TOX_PARALLEL_NO_SPINNER: 1
    CONDA_PKGS_DIR: /home/runner/conda_pkgs_dir
/usr/bin/bash codecov.sh -n -F -Q github-action-v1.5.2 -Z

  _____ _
 / ____ | | |
| | _____ | | ______  _______
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |__/ (_| (_) \ V /
 \ _____\___ / \ __,_|\___ |\ ___\___ / \_/
                              Bash-1.0.3

==> git version 2.32.0 found
==> curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
==> GitHub Actions detected.
    Env vars used:
      -> GITHUB_ACTIONS: true
      -> GITHUB_HEAD_REF:   
      -> GITHUB_REF: refs/heads/master
      -> GITHUB_REPOSITORY: lmmx/impscan
      -> GITHUB_RUN_ID: 1079804835
      -> GITHUB_SHA: f100b3b655cccd7694c1d0f54022555d9b6e0bcd
      -> GITHUB_WORKFLOW: CI
    project root: .
    Yaml found at: codecov.yml
==> Running gcov in . (disable via -X gcov)
==> Searching for coverage reports in:
    + .
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./coverage.xml bytes=47231
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
        108K	/tmp/codecov.d6DgsW.gz
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=f100b3b655cccd7694c1d0f54022555d9b6e0bcd&build=1079804835&build_url=http%3A%2F%2Fgithub.com%2Flmmx%2Fimpscan%2Factions%2Fruns%2F1079804835&name=&tag=&slug=lmmx%2Fimpscan&service=github-actions&flags=&pr=&job=CI&cmd_args=n,F,Q,Z
-> Pinging Codecov
https://codecov.io/upload/v4?package=github-action-v1.5.2-1.0.3&token=secret&branch=master&commit=f100b3b655cccd7694c1d0f54022555d9b6e0bcd&build=1079804835&build_url=http%3A%2F%2Fgithub.com%2Flmmx%2Fimpscan%2Factions%2Fruns%2F1079804835&name=&tag=&slug=lmmx%2Fimpscan&service=github-actions&flags=&pr=&job=CI&cmd_args=n,F,Q,Z
{'detail': ErrorDetail(string='Could not find a repository, try using upload token', code='not_found')}
404
==> Uploading to Codecov
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed

  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 105k 100 103 100 105k 313 320k --:--:-- --:--:-- --:--:-- 320k
100 105k 100 103 100 105k 313 320k --:--:-- --:--:-- --:--:-- 320k
    {'detail': ErrorDetail(string='Could not find a repository, try using upload token', code='not_found')}

```

### Commit SHAs

`f100b3b655cccd7694c1d0f54022555d9b6e0bcd`

### Repository

> **[GitHub - lmmx/impscan: Command line tool to identify minimal imports list...](https://github.com/lmmx/impscan)**
>
> Command line tool to identify minimal imports list and repository sources by parsing package dependency trees

### CI/CD or Build URL

[https://github.com/lmmx/impscan/runs/3195445697?check\_suite\_focus=true](https://github.com/lmmx/impscan/runs/3195445697?check_suite_focus=true)

### Uploader

> **[GitHub - codecov/codecov-action: GitHub Action that uploads coverage to Codecov...](https://github.com/codecov/codecov-action/)**
>
> GitHub Action that uploads coverage to Codecov :open\_umbrella:

### Codecov Output

See above

### Expected Results

I’ve used this in another repo and the upload proceeds fine.

…

P.S. after re-running 4 times it finally succeeded (?), but this is going to cause problems if it keeps happening so I thought I should report it!

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [July 31, 2021, 7:44am UTC](https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081/2 "2021-07-31T07:44:50Z")

</div>

@lmmx this looks to be an older version of the bash uploader, I would recommend bumping up to v2 to use our new uploader.

---

<div class="post-metadata">

**Author:** ![ezzatron](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ezzatron/32/2018_2.png) [@ezzatron](https://community.codecov.com/u/ezzatron)\
**Post date:** [August 5, 2021, 3:34am UTC](https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081/3 "2021-08-05T03:34:38Z")

</div>

I’m experiencing the same issue, and I’m using the v2 action. I have one repo where everything is working fine ([Downgrade Node.js version in workflows · snout-router/router-path@b609ce9 · GitHub](https://github.com/snout-router/router-path/runs/3247607213?check_suite_focus=true#step:6:24)) and an almost identical repo where the upload fails every time ([Update GitHub Actions workflows · snout-router/regexp@b832c01 · GitHub](https://github.com/snout-router/regexp/runs/3248291949?check_suite_focus=true#step:6:24)).

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [August 18, 2021, 5:21am UTC](https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081/4 "2021-08-18T05:21:20Z")

</div>

@ezzatron, I pushed some fixes for the uploader and I noticed we started to get commits from you in the past 2 days. Has this been resolved for you?

---

<div class="post-metadata">

**Author:** ![ezzatron](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/ezzatron/32/2018_2.png) [@ezzatron](https://community.codecov.com/u/ezzatron)\
**Post date:** [August 18, 2021, 6:36am UTC](https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081/5 "2021-08-18T06:36:40Z")

</div>

Thanks @tom! Pretty sure my issue is resolved.

I did also add the Codecov GitHub app to the `snout-router` org just recently too. I kind of did that out of desperation, because I was fairly certain that wasn’t necessary just to upload reports. But things started working after that. So I suppose it could have also been that, but I’m leaning more towards your fixes working 👍

---

<div class="post-metadata">

**Author:** ![rafmudaf](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/rafmudaf/32/2094_2.png) [@rafmudaf](https://community.codecov.com/u/rafmudaf)\
**Post date:** [October 15, 2021, 8:28pm UTC](https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081/6 "2021-10-15T20:28:26Z")

</div>

@tom We’ve got the same issue for someone on my team: [docs: Fix some typos · bjonkman/openfast@e4c8337 · GitHub](https://github.com/bjonkman/openfast/runs/3885842552?check_suite_focus=true#step:14:66)

Is it required that GitHub accounts have the Codecov app installed?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [October 18, 2021, 2:18pm UTC](https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081/7 "2021-10-18T14:18:56Z")

</div>

@rafmudaf installing the Codecov app should resolve the issue you are running to. It is not required for public projects but ensures API stability between Codecov and GitHub.

---

<div class="post-metadata">

**Author:** ![rafmudaf](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/rafmudaf/32/2094_2.png) [@rafmudaf](https://community.codecov.com/u/rafmudaf)\
**Post date:** [October 27, 2021, 3:39pm UTC](https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081/8 "2021-10-27T15:39:21Z")

</div>

@tom Currently, everyone working on my projects who does not have the CodeCov app installed on GitHub is getting the same error message. Could this be due to how I’ve configured the uploader?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [November 1, 2021, 11:22pm UTC](https://community.codecov.com/t/codecov-github-action-fails-could-not-find-a-repository-try-using-upload-token/3081/9 "2021-11-01T23:22:51Z")

</div>

@rafmudaf as mentioned in drazisil’s response [here](https://community.codecov.com/t/gaps-in-functionality/3307/3) that should not be the case. If you are still willing, I’d be happy to take a look as to why this is happening if you still have a repository with us.
