Home > Mobile >  Install package from github private repo without personal access token
Install package from github private repo without personal access token

Time:09-16

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;

  • Creating a new GitHub account just for this R package and creating the PAT on this account to enable sharing of just the one repo
  • Making public instead of private

Neither of these feels optimal, is there another way?

CodePudding user response:

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.

  • Related