Error message during package install and dev_siterep()

Hi,

I made a package called »hqcockpitutils« to bundle useful functions for a Project. When I want to install it on docker via devtools::install_github() or devtools::install_local() I get a mysterious error message - here for install_local() but it's the same from github:

devtools::install_local("./hqcockpitutils_0.1.4.20210719_R_x86_64-pc-linux-gnu.tar.gz")
Error: Failed to install 'hqcockpitutils' from local:
  HTTP error 404.
  Not Found

  Did you spell the repo owner (`XXX-digital-solutions`) and repo name (`dsl-XXXutils-r`) correctly?
  - If spelling is correct, check that you have the required permissions to access the repo.

The repo name it's referencing is another package / another project - I crossed out the name. I use the other package as an import for the hqcockpitutils package.

When I run the devtools::check() there is no error message for the package itself. But when I run devtools::dev_siterep() I get the same message like on install_xxx()

R > dev_sitrep(debug = TRUE)
Error: HTTP error 404.
  Not Found

  Did you spell the repo owner (`XXX-digital-solutions`) and repo name (`dsl-xxxutils-r`) correctly?
  - If spelling is correct, check that you have the required permissions to access the repo.
R >

Unfortunatelly there are no extra infromation when i set debug on TRUE.

Can you give me a hint what to do next?

Some vague guesses. Is the repo of that other package public? Is the output of usethis::git_sitrep()indicating any problem?

Hi maelle,

both packages are private, but the first repo is installed correctly before installation of the hqcockpitutils-package.

The output of git_sitrep() shows no problems.

R > usethis::git_sitrep()
Git config (global)
• Name: 'XXX'
• Email: 'XXX'
• Vaccinated: TRUE
• Default Git protocol: 'https'
GitHub
• Default GitHub host: 'https://github.com'
• Personal access token for 'https://github.com': <unset>
x Call `gh_token_help()` for help configuring a token
Git repo for current project
• Active usethis project: '/home/administrator/workdir/dsl-hqcockpitutils'
• Default branch: 'master'
• Current local branch -> remote tracking branch:
  'master' -> 'origin/master'
GitHub remote configuration
• Type = 'maybe_ours_or_theirs'
• Host = 'https://github.com'
• Config supports a pull request = NA
• origin = 'XXX-digital-solutions/dsl-hqcockpitutils'
• upstream = <not configured>
• Desc = 'origin' is a GitHub repo and 'upstream' is either not configured or is not a GitHub repo.
  
  We may be offline or you may need to configure a GitHub personal access
  token. `gh_token_help()` can help with that.
  
  Read more about what this GitHub remote configurations means at:
  'https://happygitwithr.com/common-remote-setups.html'

At the stage, where I want to install the package, i can load the dsl-XXXutils package with no problems.

So, the output above has

• Personal access token for 'https://github.com': <unset>
x Call `gh_token_help()` for help configuring a token
Git repo for current project

(the items with a cross are the ones indicating something is not optimal yet).

I think that even if the package is installed beforehand, remotes tries to query the repo to see whether there's a newer version. That's why setting a GitHub PAT might help.

usethis docs about GitHub credentials.

Hi all,

@maelle : configuring git credentials for the project didn't solve the problem - same errors...

I found a workaround for the problem but don't know how it could be solved in the right way:

  • I have two private repositories on github
  • I have access to github over a PAT
  • When I use one package as an "import" in the DESCRIPTION file of the second package, the installation and dev_siterep cause an error, probably because it's checking the dependencies (as maelle mentioned) and there is no access (because it's private?)

My workaround is, to delete the first package from the "import:" of the DESCRIPTION file. That's it...

I would be really glad if there are any further ideas to solve this problem . Thanks maelle for your help!

Ah I'm sorry.

Does the repo with the package have a standard structure i.e. not the package in a subdirectory?

No, both packages are in standard structure.