thevalidatoR icon indicating copy to clipboard operation
thevalidatoR copied to clipboard

Error: Failed to install 'covr' from GitHub:

Open venkatesh588 opened this issue 4 months ago • 2 comments

What happened?

Hi Team,

We are using in Gihub data residency account which is ghe.com. When we try to use this action, this action is expecting the token for the Gihub.com account and it's not working with GHE.com github token. We are getting 401 error message while downloading the dependency. Please find the below error message.

For re-producing the issue, please use github data residency account and use this action, token created in the github GHE account.

Run insightsengineering/thevalidatoR@v2 with: report_pkg_dir: ./tests/packages/abind report_template_path: ./template.qmd no_cache: false cache_version: v1 disable_install_dev_deps: false env: GITHUB_PAT: *** Run echo "R_VERSION=$(R --version | head -1 | awk '{print $3}')" >> $GITHUB_OUTPUT echo "R_VERSION=$(R --version | head -1 | awk '{print $3}')" >> $GITHUB_OUTPUT shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} env: GITHUB_PAT: *** Run mkdir -p ${RUNNER_TEMP}/Library mkdir -p ${RUNNER_TEMP}/Library echo ".libPaths(c('${RUNNER_TEMP}/Library', .libPaths()))" > ~/.Rprofile cat ~/.Rprofile shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} env: GITHUB_PAT: *** .libPaths(c('/home/docker/actions-runner/_work/_temp/Library', .libPaths())) Run actions/cache@v4 with: path: /home/runner/work/_temp/Library key: v1-Linux-4.4.0- restore-keys: v1-Linux-4.4.0 enableCrossOsArchive: false fail-on-cache-miss: false lookup-only: false save-always: false env: GITHUB_PAT: *** Cache not found for input keys: v1-Linux-4.4.0-, v1-Linux-4.4.0 Run ${GITHUB_ACTION_PATH}/dependencies.R ${GITHUB_ACTION_PATH}/dependencies.R [ ! -f "./template.qmd" ] && cp ${GITHUB_ACTION_PATH}/template.qmd . || echo "./template.qmd already exists" MIN_QUARTO_VERSION="1.5.29" if [[ "$(echo -e "$(quarto --version)\n${MIN_QUARTO_VERSION}" | sort -V | head -1)" == "${MIN_QUARTO_VERSION}" ]]; then echo "✅ Quarto CLI version sufficient (>= ${MIN_QUARTO_VERSION})" echo "Quarto CLI version: $(quarto --version)" else echo "❌ Quarto CLI version insufficient (< ${MIN_QUARTO_VERSION})" apt-get update apt-get install -qy wget jq # Install newer version of Quarto CLI. # This gets the latest version number (v1.5 up to v1.9) of Quarto from GitHub releases. # It assumes that such version number (v1.5 up to v1.9) exists within the last 100 released Quarto versions. export QUARTO_VERSION="$(curl -L -H "Accept: application/vnd.github+json"
-H "X-GitHub-Api-Version: 2022-11-28"
https://api.github.com/repos/quarto-dev/quarto-cli/releases?per_page=100
2>/dev/null |
jq -r 'map(select(.tag_name | test("^v1.[5-9]"))) | .[0].name[1:]')" echo "Downloading and installing latest Quarto CLI version ${QUARTO_VERSION}" wget https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb dpkg -i quarto-${QUARTO_VERSION}-linux-amd64.deb echo "New Quarto CLI version: $(quarto --version)" fi shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} env: GITHUB_PAT: *** Using github PAT from envvar GITHUB_PAT. Use gitcreds::gitcreds_set() and unset GITHUB_PAT in .Renviron (or elsewhere) if you want to use the more secure git credential store instead. Error: Failed to install 'covr' from GitHub: HTTP error 401. Bad credentials

Rate limit remaining: 56/60 Rate limit reset at: 2025-08-15 20:21:21 UTC

Execution halted Error: Process completed with exit code 1.

Relevant log output

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • [x] I agree to follow this project's Contribution Guidelines.

Security Policy

  • [x] I agree to follow this project's Security Policy.

venkatesh588 avatar Aug 15 '25 20:08 venkatesh588

Hey @venkatesh588 - as ghe.com and github.com are different platforms, it might be expected the tokens are not interchangeable?

The docs seem to imply there is no connection

Have you tried using a github.com token?

epijim avatar Aug 25 '25 11:08 epijim

Hi @epijim ,

Yes tried using the github.com token and it works fine without any issue.

Regards. Venkatesh

venkatesh588 avatar Aug 25 '25 12:08 venkatesh588