r-lib / remotes

Install R packages from GitHub, GitLab, Bitbucket, git, svn repositories, URLs
https://remotes.r-lib.org/
Other
330 stars 152 forks source link

Add support for deploy keys in install_github #716

Open rvernica opened 2 years ago

rvernica commented 2 years ago

Is your feature request related to a problem? Please describe.

To use install_github with a private repository a Personal Access Token (PAT) is required. This is not ideal for teams as PATs are linked to an individual.

Describe the solution you'd like

Add support for deploy keys in install_github. A deploy key is linked to a repository and not an individual.

Describe alternatives you've considered

An alternative would be to use the deploy key and checkout the private repository. Then install the R package from the local directory.

jennybc commented 2 years ago

devtools::install_github() is actually remotes::install_github(), so I'm transferring this issue.

gaborcsardi commented 2 years ago

Can you use install_git() instead? That should work with ssh keys I believe.

install_github() uses the GitHub API, and I am not sure if the API works with ssh keys.