Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install package from Github using Github Actions #413

Open
ghost opened this issue Sep 14, 2022 · 5 comments
Open

Can't install package from Github using Github Actions #413

ghost opened this issue Sep 14, 2022 · 5 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@ghost
Copy link

ghost commented Sep 14, 2022

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.

@gaborcsardi
Copy link
Member

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

@ghost
Copy link
Author

ghost commented Sep 14, 2022

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

@ghost
Copy link
Author

ghost commented Sep 14, 2022

@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

  1. renv is able to install tidyselect:

Screen Shot 2022-09-14 at 2 40 34 PM

@gaborcsardi
Copy link
Member

Do you still have this issue?

@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Nov 1, 2023
@ghost
Copy link
Author

ghost commented Nov 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant