-
Notifications
You must be signed in to change notification settings - Fork 155
Closed
Description
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
- Make sure a PAT is created.
usethis::create_github_token()
credentials::set_github_pat("YourPAT")
- Try to install package
This produces the error:
remotes::install_github("nmfs-ost/satf")
Using GitHub PAT from the git credential store.
Error: Failed to install 'unknown package' from GitHub:
HTTP error 403.
Resource protected by organization SAML enforcement. You must grant your Personal Access token access to this organization.
Rate limit remaining: 4986/5000
Rate limit reset at: 2024-11-14 17:49:00 UTC
- Delete the PAT
gitcreds::gitcreds_delete()
Now remotes::install_github("nmfs-ost/satf") works
- Test on a fork that is not in Enterprise w SAML
remotes::install_github("eeholmes/satf")
works when there is a PAT.
Where the problem appears
curl::curl_fetch_memory(url, handle = h)
called in
remotes:::github_DESCRIPTION()
The values are
url= "https://api.github.com/repos/nmfs-ost/satf/contents/DESCRIPTION?ref=HEAD"
headers
Accept
"application/vnd.github.v3.raw"
Authorization
"token xxxx"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels