Skip to content

SAML enforcement prohibits installing public extension #6675

@legomushroom

Description

@legomushroom

Describe the bug

Cannot install CLI extensions hosted on public repo from a github org.

Steps to reproduce the behavior

  1. Create a Codespace and connect to it.
  2. Try installing an extension from a public repo from the github org:
gh extension install github/gh-net
  1. Notice the error:
could not check for binary extension: HTTP 403: Resource protected by organization SAML enforcement. You must grant your OAuth token access to this organization. (https://api.github.com/repos/github/gh-net/releases/latest)
Authorize in your web browser:  https://github.com/orgs/github/sso?authorization_request={REDUCTED}

Expected vs actual behavior

I'd expect the extension to be installed successfully since this is a public repo and the releases are accessible to everyone:

curl --location --request GET 'https://api.github.com/repos/github/gh-net/releases/latest'

Logs

attached
→ gh extension install github/gh-net

could not check for binary extension: HTTP 403: Resource protected by organization SAML enforcement. You must grant your OAuth token access to this organization. (https://api.github.com/repos/github/gh-net/releases/latest)
Authorize in your web browser:  https://github.com/orgs/github/sso?authorization_request={REDUCTED}

→ curl --location --request GET 'https://api.github.com/repos/github/gh-net/releases/latest'

{
  "url": "https://api.github.com/repos/github/gh-net/releases/77339109",
  "assets_url": "https://api.github.com/repos/github/gh-net/releases/77339109/assets",
  "upload_url": "https://uploads.github.com/repos/github/gh-net/releases/77339109/assets{?name,label}",
  "html_url": "https://github.com/github/gh-net/releases/tag/v0.12.4",
  "id": 77339109,
  "author": {
    "login": "legomushroom",
    "id": 1478800,
    "node_id": "MDQ6VXNlcjE0Nzg4MDA=",
    "avatar_url": "https://avatars.githubusercontent.com/u/1478800?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/legomushroom",
    "html_url": "https://github.com/legomushroom",
    "followers_url": "https://api.github.com/users/legomushroom/followers",
    "following_url": "https://api.github.com/users/legomushroom/following{/other_user}",
    "gists_url": "https://api.github.com/users/legomushroom/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/legomushroom/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/legomushroom/subscriptions",
    "organizations_url": "https://api.github.com/users/legomushroom/orgs",
    "repos_url": "https://api.github.com/users/legomushroom/repos",
    "events_url": "https://api.github.com/users/legomushroom/events{/privacy}",
    "received_events_url": "https://api.github.com/users/legomushroom/received_events",
    "type": "User",
    "site_admin": true
  },
  "node_id": "RE_kwDOHAlVas4EnBnl",
  "tag_name": "v0.12.4",
  "target_commitish": "main",
  "name": "Release v0.12.4",
  "draft": false,
  "prerelease": false,
  "created_at": "2022-09-15T21:17:27Z",
  "published_at": "2022-09-15T21:17:30Z",
  "assets": [
    {
      "url": "https://api.github.com/repos/github/gh-net/releases/assets/78008835",
      "id": 78008835,
      "node_id": "RA_kwDOHAlVas4EplID",
      "name": "darwin-amd64",
      "label": "",
      "uploader": {
        "login": "legomushroom",
        "id": 1478800,
        "node_id": "MDQ6VXNlcjE0Nzg4MDA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1478800?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/legomushroom",
        "html_url": "https://github.com/legomushroom",
        "followers_url": "https://api.github.com/users/legomushroom/followers",
        "following_url": "https://api.github.com/users/legomushroom/following{/other_user}",
        "gists_url": "https://api.github.com/users/legomushroom/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/legomushroom/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/legomushroom/subscriptions",
        "organizations_url": "https://api.github.com/users/legomushroom/orgs",
        "repos_url": "https://api.github.com/users/legomushroom/repos",
        "events_url": "https://api.github.com/users/legomushroom/events{/privacy}",
        "received_events_url": "https://api.github.com/users/legomushroom/received_events",
        "type": "User",
        "site_admin": true
      },
      "content_type": "application/x-binary",
      "state": "uploaded",
      "size": 11860080,
      "download_count": 112,
      "created_at": "2022-09-15T21:17:31Z",
      "updated_at": "2022-09-15T21:17:31Z",
      "browser_download_url": "https://github.com/github/gh-net/releases/download/v0.12.4/darwin-amd64"
    },
    {
      "url": "https://api.github.com/repos/github/gh-net/releases/assets/78008839",
      "id": 78008839,
      "node_id": "RA_kwDOHAlVas4EplIH",
      "name": "linux-amd64",
      "label": "",
      "uploader": {
        "login": "legomushroom",
        "id": 1478800,
        "node_id": "MDQ6VXNlcjE0Nzg4MDA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1478800?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/legomushroom",
        "html_url": "https://github.com/legomushroom",
        "followers_url": "https://api.github.com/users/legomushroom/followers",
        "following_url": "https://api.github.com/users/legomushroom/following{/other_user}",
        "gists_url": "https://api.github.com/users/legomushroom/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/legomushroom/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/legomushroom/subscriptions",
        "organizations_url": "https://api.github.com/users/legomushroom/orgs",
        "repos_url": "https://api.github.com/users/legomushroom/repos",
        "events_url": "https://api.github.com/users/legomushroom/events{/privacy}",
        "received_events_url": "https://api.github.com/users/legomushroom/received_events",
        "type": "User",
        "site_admin": true
      },
      "content_type": "application/x-binary",
      "state": "uploaded",
      "size": 21887592,
      "download_count": 698,
      "created_at": "2022-09-15T21:17:33Z",
      "updated_at": "2022-09-15T21:17:34Z",
      "browser_download_url": "https://github.com/github/gh-net/releases/download/v0.12.4/linux-amd64"
    },
    {
      "url": "https://api.github.com/repos/github/gh-net/releases/assets/78008840",
      "id": 78008840,
      "node_id": "RA_kwDOHAlVas4EplII",
      "name": "linux-arm64",
      "label": "",
      "uploader": {
        "login": "legomushroom",
        "id": 1478800,
        "node_id": "MDQ6VXNlcjE0Nzg4MDA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1478800?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/legomushroom",
        "html_url": "https://github.com/legomushroom",
        "followers_url": "https://api.github.com/users/legomushroom/followers",
        "following_url": "https://api.github.com/users/legomushroom/following{/other_user}",
        "gists_url": "https://api.github.com/users/legomushroom/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/legomushroom/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/legomushroom/subscriptions",
        "organizations_url": "https://api.github.com/users/legomushroom/orgs",
        "repos_url": "https://api.github.com/users/legomushroom/repos",
        "events_url": "https://api.github.com/users/legomushroom/events{/privacy}",
        "received_events_url": "https://api.github.com/users/legomushroom/received_events",
        "type": "User",
        "site_admin": true
      },
      "content_type": "application/x-binary",
      "state": "uploaded",
      "size": 21116808,
      "download_count": 25,
      "created_at": "2022-09-15T21:17:35Z",
      "updated_at": "2022-09-15T21:17:36Z",
      "browser_download_url": "https://github.com/github/gh-net/releases/download/v0.12.4/linux-arm64"
    },
    {
      "url": "https://api.github.com/repos/github/gh-net/releases/assets/78008843",
      "id": 78008843,
      "node_id": "RA_kwDOHAlVas4EplIL",
      "name": "linux-armv6",
      "label": "",
      "uploader": {
        "login": "legomushroom",
        "id": 1478800,
        "node_id": "MDQ6VXNlcjE0Nzg4MDA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1478800?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/legomushroom",
        "html_url": "https://github.com/legomushroom",
        "followers_url": "https://api.github.com/users/legomushroom/followers",
        "following_url": "https://api.github.com/users/legomushroom/following{/other_user}",
        "gists_url": "https://api.github.com/users/legomushroom/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/legomushroom/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/legomushroom/subscriptions",
        "organizations_url": "https://api.github.com/users/legomushroom/orgs",
        "repos_url": "https://api.github.com/users/legomushroom/repos",
        "events_url": "https://api.github.com/users/legomushroom/events{/privacy}",
        "received_events_url": "https://api.github.com/users/legomushroom/received_events",
        "type": "User",
        "site_admin": true
      },
      "content_type": "application/x-binary",
      "state": "uploaded",
      "size": 19320892,
      "download_count": 1,
      "created_at": "2022-09-15T21:17:37Z",
      "updated_at": "2022-09-15T21:17:38Z",
      "browser_download_url": "https://github.com/github/gh-net/releases/download/v0.12.4/linux-armv6"
    },
    {
      "url": "https://api.github.com/repos/github/gh-net/releases/assets/78008846",
      "id": 78008846,
      "node_id": "RA_kwDOHAlVas4EplIO",
      "name": "linux-armv7",
      "label": "",
      "uploader": {
        "login": "legomushroom",
        "id": 1478800,
        "node_id": "MDQ6VXNlcjE0Nzg4MDA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1478800?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/legomushroom",
        "html_url": "https://github.com/legomushroom",
        "followers_url": "https://api.github.com/users/legomushroom/followers",
        "following_url": "https://api.github.com/users/legomushroom/following{/other_user}",
        "gists_url": "https://api.github.com/users/legomushroom/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/legomushroom/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/legomushroom/subscriptions",
        "organizations_url": "https://api.github.com/users/legomushroom/orgs",
        "repos_url": "https://api.github.com/users/legomushroom/repos",
        "events_url": "https://api.github.com/users/legomushroom/events{/privacy}",
        "received_events_url": "https://api.github.com/users/legomushroom/received_events",
        "type": "User",
        "site_admin": true
      },
      "content_type": "application/x-binary",
      "state": "uploaded",
      "size": 18906024,
      "download_count": 1,
      "created_at": "2022-09-15T21:17:38Z",
      "updated_at": "2022-09-15T21:17:39Z",
      "browser_download_url": "https://github.com/github/gh-net/releases/download/v0.12.4/linux-armv7"
    },
    {
      "url": "https://api.github.com/repos/github/gh-net/releases/assets/78008836",
      "id": 78008836,
      "node_id": "RA_kwDOHAlVas4EplIE",
      "name": "windows-amd64.exe",
      "label": "",
      "uploader": {
        "login": "legomushroom",
        "id": 1478800,
        "node_id": "MDQ6VXNlcjE0Nzg4MDA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1478800?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/legomushroom",
        "html_url": "https://github.com/legomushroom",
        "followers_url": "https://api.github.com/users/legomushroom/followers",
        "following_url": "https://api.github.com/users/legomushroom/following{/other_user}",
        "gists_url": "https://api.github.com/users/legomushroom/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/legomushroom/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/legomushroom/subscriptions",
        "organizations_url": "https://api.github.com/users/legomushroom/orgs",
        "repos_url": "https://api.github.com/users/legomushroom/repos",
        "events_url": "https://api.github.com/users/legomushroom/events{/privacy}",
        "received_events_url": "https://api.github.com/users/legomushroom/received_events",
        "type": "User",
        "site_admin": true
      },
      "content_type": "application/x-binary",
      "state": "uploaded",
      "size": 9911296,
      "download_count": 83,
      "created_at": "2022-09-15T21:17:32Z",
      "updated_at": "2022-09-15T21:17:33Z",
      "browser_download_url": "https://github.com/github/gh-net/releases/download/v0.12.4/windows-amd64.exe"
    }
  ],
  "tarball_url": "https://api.github.com/repos/github/gh-net/tarball/v0.12.4",
  "zipball_url": "https://api.github.com/repos/github/gh-net/zipball/v0.12.4",
  "body": "- performance improvements."
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    codespacesenhancementa request to improve CLIgh-codespacerelating to the gh codespace commandgh-extensionrelating to the gh extension command

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions