rgithubremotespersonal-access-token

Install package from github private repo without personal access token


I am trying to install an R package from a GitHub account I currently own and operate. I want to be able to share this R package with other users (i.e. allow them to download) but I want to constrain it to people I approve of.

I could do this by creating a Personal Access Token (PAT) and sharing (remotes::install_github(..., auth_token = "PAT")), but then they would get access to all of my repos on my account which is not an option.

Other options I have seen suggested include;

Neither of these feels optimal, is there another way?


Solution

  • You could add others as collaborators on your private repo, then they could use their own PAT to access the repo. It's not great idea to share PAT so this way each party is responsible for their own. That will also allow you to easily remove individuals without affecting access for everyone.