-
Notifications
You must be signed in to change notification settings - Fork 153
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
Unable to install public R packages on GitHub if SAML turned on (GitHub Enterprise) #818
Comments
Did you try what the error message suggests? |
That is only possible for organization members. These are R packages hosted for public use on GitHub Enterprise. Non-members have no way to authorize PAT for organization use. In contrast, for org members you see a button that says "Configure SSO" or something like that. We turned on SAML and now no one can install our packages without deleting their PATs, which obviously we don't want them to have to do. Also |
That's not what I see, I do have a PAT and can install them:
|
Unfortunately GitHub + SAML are a bit weird when it comes to public repos. Non-members can see the repos, in fact even people without a GItHub account can see them. But if you are an org member, then you can only see the repo (on the web) if you log in with SAML. Tokens are similar, if you are an org member, you need grant the PAT access to the org. This is my understanding, mostly based on experience, please correct me if I am wrong. I am also not sure what remotes could do differently here. |
@gaborcsardi Interesting. Thanks so much for the comment. This is extremely helpful. I will do more investigation. |
I am sad to report back that the results of testing are kind of horrible. Within our Enterprise account, we have many orgs. Each member is only a member of some. You can only give PATs access to orgs that you are a member of. That means there is no way to install R packages in public repos from other orgs (in our Enterprise account) that you are not a member of. Weirdly I AM able to see public repos in other orgs (in our Enterprise) without logging in to Enterprise. I am logged into GitHub in the browser but I am not logged into Enterprise.
So it seems to me it is not accessing the repo per se that is the issue. I can see that wo SAML log in, but if I try to see the org, it ask for SAML. Note if I log out of GitHub in the browser, I can both see the repo and the org. Is remotes (or another package it uses) somehow needing to see the org in addition to the repo? |
@gaborcsardi What remote could do is respect Example
returns (for me) as a member of the Enterprise account to which SWFSC belongs:
Note I am not a member of that org so I have no way to authorize my PAT for that org. I am a member of another org in that Enterprise account. So somewhere it looked for the PAT even though I passed in NULL. If I delete the PAT, then
|
Ignoring Line 246 in 828ba53
Right at the top of
remote_package_name(remote) calls this and you can see that
|
I put in a PR. 2 small changes to make |
Background
We have R packages on public repositories on GitHub Enterprise. SAML is turned on. But the repos are fully public and there are no restrictions to downloading, cloning or forking. But if we try to install the packages with
install_github()
, we get a error if the user has a PAT. Deleting the PAT will cause installation to work. The error is only with packages on GitHub Enterprise with SAML turned on.Reprex
This produces the error:
Now
remotes::install_github("nmfs-ost/satf")
worksworks when there is a PAT.
Where the problem appears
called in
The values are
headers
The text was updated successfully, but these errors were encountered: