pak icon indicating copy to clipboard operation
pak copied to clipboard

Can't install package from Github using Github Actions

Open ghost opened this issue 3 years ago • 5 comments

I have the following workflow for installing packages with pak and then running a few tests: Screen Shot 2022-09-14 at 11 46 17 AM I'm having issues with installing private repos within my organization. I tried to overcome this problem in a few ways, but they all failed. I added a github PAT as a secret in the repository, and confirmed the token can access the repositories I am trying to install. I defined the package name in Imports and the "owner/repo" in Remotes, but then I hit this error: Screen Shot 2022-09-14 at 11 48 47 AM I also directly specified the URL of the package in Imports: Screen Shot 2022-09-14 at 11 49 36 AM But the above also fails, with a different error: Screen Shot 2022-09-14 at 11 49 57 AM I have a similar workflow using renv and a PAT that works, so I am not sure if there's a bug in pak that's preventing the package from being installed, or if I am doing something wrong. Any ideas? Also, let me know what other information I can provide that would help with the problem.

ghost avatar Sep 14 '22 15:09 ghost

I am afraid that you'll need to create a reproducible example, without that it is very hard to help you.

gaborcsardi avatar Sep 14 '22 15:09 gaborcsardi

Thanks for the quick reply. Fair enough, let me debug a bit more here to see if I can find the problem.

ghost avatar Sep 14 '22 18:09 ghost

@gaborcsardi I am hitting an issue that is easy to replicate and could explain the problems above.

How to replicate:

  • Install R 4.1.2
  • Install renv
  • Create new directory, launch R, and use renv::init(bare = TRUE)
  • Restart R
  • Install pak with renv::install("pak")
  • Confirm that tidyselect is not installed with library(tidyselect)
  • Install tidyselect with pak via pak::pkg_install("r-lib/tidyselect"). Install fails due to not being able to install dependencies (see 1st screenshot).
  • Install tidyselect with renv via renv::install("r-lib/tidyselect") (see 2nd screenshot).

See the screenshots below.

  1. Issue with pak when installing tidyselect: Screen Shot 2022-09-14 at 2 38 16 PM

  2. renv is able to install tidyselect: Screen Shot 2022-09-14 at 2 40 34 PM

ghost avatar Sep 14 '22 18:09 ghost

Do you still have this issue?

gaborcsardi avatar Nov 01 '23 13:11 gaborcsardi

Hey Gabor, it's been a year so I am not sure haha. Let me check again and see if the problem is still there, with the major changes to renv as well I think my issues might have been cleared.

ghost avatar Nov 01 '23 13:11 ghost