GitHub permissions for installing packages from private repo

91 views
Skip to first unread message

Eric Goldsmith

unread,
May 17, 2016, 11:30:50 AM5/17/16
to ShinyApps Users
Following the instructions for Enabling use of private packages on github.com, seems to require granting full read/write access to all repos in an organization:

This application will be able to read and write all public and private repository data. This includes the following:
  • Code
  • Issues
  • Pull requests
  • Wikis
  • Settings
  • Webhooks and services
  • Deploy keys

Granting that level of access makes me very nervous.

Why isn't read-only access sufficient?

Can access be granted more granularly (i.e. by repo)?

As an alternative to having Shinyapps.io pull the package from a private GH repo, can it be configure to pull from a local clone of the repo (and sent with the deployment bundle)?

Thanks,
Eric

Tareef Kawaf

unread,
May 17, 2016, 12:20:46 PM5/17/16
to Eric Goldsmith, ShinyApps Users
I am not an expert on this, but my understanding is that the scope of permissions is a limitation of GitHub itself, and isn't something that we could narrow down, but I will check with the engineering team to confirm. I have to admit I was similarly uncomfortable when I first saw that.

You may be able to constrain the access to a particular repo if you use a separate github user and narrow that particular user's access to the repos that you are okay with.  

Unfortunately there isn't a great way today to upload the source code of the package with the repo today.  I have seen some people implement a hack where their application will try to install the package before the server() call.  The problem as you can imagine Eric is that most people aren't running the same operating system on their laptops/desktops as shinyapps.io is running and given the prevalence of system level dependencies and native code, shinyapps.io needs to be able to compile the code on the same operating system that it is running on.  







--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/3c2dd856-86d1-4462-9923-dd73f9475ae9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joshua Spiewak

unread,
May 17, 2016, 3:05:23 PM5/17/16
to Tareef Kawaf, Eric Goldsmith, ShinyApps Users
Hi Eric,

Currently the facility to pull from private GitHub repositories uses their OAuth APIs, and as such we are limited to the scopes they provide. The only scope that grants access to code is "repo", which means write access as well.

We will explore adding support for GitHub's Deploy Keys, which can be read-only, but I can't promise when we would get to that.


For more options, visit https://groups.google.com/d/optout.
--
    -- Josh

Eric Goldsmith

unread,
May 18, 2016, 4:26:34 PM5/18/16
to ShinyApps Users, tar...@rstudio.com, er...@goldsmithgroup.org
(I originally sent this reply earlier today, but it appears to have disappeared into the ether ... re-posting)

Thanks, Tareef and Josh.

Here's what I wound up doing, for the benefit of others trying to accomplish this:

 - Create a new GitHub user
 - Add the new user as a read-only, "collaborator" for the needed repo(s) 
 - Connect the new user account to shinyapps.io


-Eric
Reply all
Reply to author
Forward
0 new messages