'Problem downloading package from git actions, results in mangled URL

In our git actions output for testing our custom R package (hosted on github), we're experiencing an error during execution:

Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  cannot open URL 'https://api.github.com/repos/***/CirceR/contents/DESCRIPTION?ref=HEAD'
Calls: saveRDS ... github_DESCRIPTION -> download -> base_download -> base_download_headers
Execution halted
Error: Process completed with exit code 1.

The main repo is here: https://github.com/OHDSI/CohortGenerator

The github actions report is here: https://github.com/OHDSI/CohortGenerator/runs/3294257207?check_suite_focus=true

The referenced package CirceR is found here: https://github.com/ohdsi/circer

Our main question is: is it normal for the requested URL for the DESCRITPION file to be masked with the *** as in: cannot open URL 'https://api.github.com/repos/***/CirceR/contents/DESCRIPTION?ref=HEAD'

If we change the *** to the actual organization OHDSI for this URL the request works, so is it possible the URL is being mangled?

We've tested loading each individual package locally and this error doesn't occur, so we think it's localized to github actions.



Solution 1:[1]

I believe the output is trying to shorten the string so you can see how it starts, and how it ends, but not the middle...for readability purposes. My issue was I wanted the entire contents of the string (other errors in 'shorter' repository names gives the full URL). So, I believe this truncation is by design.

To solve the underlying issue, I had to specify a GIT_PAT to use to invoke the API and that cleared out the error I was getting.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Chris Knoll