I'm getting a similar error on multiple sites that are building using Github Actions whenever it tries to install a development version of a package using {remotes}. Here's an example error message:
Error in utils::download.file(url, path, method = method, quiet = quiet, :
cannot open URL 'https://api.github.com/repos/hadley/emo/contents/DESCRIPTION?ref=HEAD'
If you go to the url provided, it exists, so I'm not sure why it can't open it. Here's the log: