[BUG] "Repository not found" when using Global Token and repository names including upper case characters.
Describe the bug When using Global Token, it doesn't detect repository name correctly. It's somehow ignoring the case.
ExampleOrg/example-item is possibly tried to go exampleorg/example-item .
It's not the case with Repository Token.
To Reproduce Steps to reproduce the behavior:
- Create repo on owner with including upper case chars: ExampleOrg/example-item
- Upload coverage from that with Global Token as following.
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
Expected behavior A clear and concise description of what you expected to happen.
Regression N/A
Screenshots N/A
Product Area uploader
Versions
- OS: ubuntu-24.04
- Git Host: GitHub
- CI/CD: GitHub Actions
- Uploader: codecov/[email protected]
Commit and CI link
Run codecov/codecov-action@v5
Run CC_ACTION_VERSION=$(cat ${GITHUB_ACTION_PATH}/src/version)
==> Running Action version 5.4.3
Run git config --global --add safe.directory "/home/runner/work/<REDACTED>/<REDACTED>"
Run CC_FORK="false"
Run actions/github-script@v7
Run if [ "false" == 'true' ] && [ "$CC_FORK" != 'true' ];
==> Token set from input
Run if [ -z "$CC_BRANCH" ] && [ -z "$CC_TOKEN" ] && [ "$CC_FORK" == 'true' ]
Run if [ -z "$CC_SHA" ];
Run ${GITHUB_ACTION_PATH}/dist/codecov.sh
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Wrapper-0.2.1
==> Detected linux
-> Downloading https://cli.codecov.io/latest/linux/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 10.6M 100 10.6M 0 0 128M 0 --:--:-- --:--:-- --:--:-- 130M
==> Finishing downloading linux:latest
Version: v11.0.3
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
==> Verifying GPG signature integrity
-> Downloading https://cli.codecov.io/latest/linux/codecov.SHA256SUM
-> Downloading https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpg: Signature made Thu May 29 21:23:31 2025 UTC
gpg: using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C 62FF 806B B28A ED77 9869
codecov: OK
==> CLI integrity verified
-> Token of length 36 detected
==> Running upload-coverage
./codecov upload-coverage -t <redacted> --fail-on-error --git-service github --gcov-executable gcov
info - 2025-06-03 06:30:15,230 -- ci service found: github-actions
warning - 2025-06-03 06:30:15,284 -- xcrun is not installed or can't be found.
warning - 2025-06-03 06:30:15,576 -- No gcov data found.
warning - 2025-06-03 06:30:15,577 -- coverage.py is not installed or can't be found.
info - 2025-06-03 06:30:15,595 -- Found 1 coverage files to report
info - 2025-06-03 06:30:15,595 -- > /home/runner/work/<REDACTED>/<REDACTED>/coverage/cobertura-coverage.xml
info - 2025-06-03 06:30:15,982 -- Process Upload complete
error - 2025-06-03 06:30:15,982 -- Upload failed: {"message":"Repository not found"}
Sentry is attempting to send 2 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit
==> Failed to run upload-coverage
Exiting...
Error: Process completed with exit code 1.
Additional context
This is the issue of the comment https://github.com/codecov/codecov-action/issues/1623#issuecomment-2934286761 .
Workarounds:
- Specify slug explicitly as https://github.com/codecov/codecov-action/issues/1623#issuecomment-2923125500
- Use Repository Token instead.
Hmm, slug workaround is not working for me...
This is interesting - thanks for the detailed but report @LumaKernel! Is it possible for you to try regenerating the org upload token? We had another report this week where someone's global upload token seemed to change - if this works we could be more confident something is going wrong with that specifically.
Ah, sorry, I'm not an administrator of the org, and not willing to ask so much times of them. Please let me know it's considered as resolved.
Oh, strange, but now it was resolved without any actions... I can now publish with Global Token simply.
It happened again for another repository... 🤔
@LumaKernel could you try using OIDC instead of tokens? This is an alternative upload authentication method: https://github.com/codecov/codecov-action?tab=readme-ov-file#using-oidc
Hi,
Anything on this?
We're facing the exact same issue when using the global token. The upload step is working well with the repository token but we want to rely on the global one to ease our multi repositories implementation.
[2025-06-25T10:32:05.341Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 400 - {"message":"Repository not found"}
[2025-06-25T10:32:05.342Z] ['verbose'] The error stack is: Error: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 400 - {"message":"Repository not found"}
Exactly the same issue here. Repo contains upper case characters.
Hi everyone, I identified the issue with case-sensitivity and pushed a fix for that so it should be resolved. I think the org token issue was downstream of the case sensitivity bug so that should be resolved as well. Please let me know if you run into this issue again!
Looks like I run into this issue again. v5.4.3 , Orgname include upper case letters and hyphen. Nothing helps - setting slug/repo token/org token, everything lead to "repository not found" issue.
yeah, not sure why this was marked as closed. I can confirm that the upload wasn't working for me with Global Token even after adding the slug. Then I started using the Repository Token, and it worked.