gh-dash icon indicating copy to clipboard operation
gh-dash copied to clipboard

[BUG] "Resource protected by organization SAML enforcement." when used on independent repository

Open ericcornelissen opened this issue 2 years ago • 2 comments

Describe the bug When I try to use gh-dash on a repository owned by my personal account I'm getting an error related to SAML, while SAML is only required for repositories from one of the GitHub organizations that I'm a member of.

To Reproduce Steps to reproduce the behavior:

  1. Be part of an organization that enforces SAML
  2. Authenticate the GitHub CLI outside the enforced SAML
  3. Navigate to a local clone of a repository from your personal GitHub account
  4. Run gh dash (after having installed it, of course)
  5. See error
    YYYY/MM/DD HH:mm:SS Message: Resource protected by organization SAML enforcement. You must grant your OAuth token access to this organization., Locations: [{Line:1 Column:103}]
    

Expected behavior Using gh-dash on a repository without SAML requirements should work, even if the user is part of an organization that has SAML requirements.

Screenshots

Screenshot from 2022-06-13 23-53-21

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.4 LTS (64 bit)

ericcornelissen avatar Jun 13 '22 21:06 ericcornelissen

I also have repos that are protected with SAML and everything works. I have both private repos (no SAML) and work related repos (with SAML) Wdym by this...?

Authenticate the GitHub CLI outside the enforced SAML

dlvhdr avatar Jul 03 '22 11:07 dlvhdr

Wdym by this...?

Authenticate the GitHub CLI outside the enforced SAML

Running

gh auth login

Selecting the web authentication mechanism:

select authentication mechanism

and when presented with:

authentication preview

Not "Authorize"-ing the (SAML) organization (instead clicking "Continue")

ericcornelissen avatar Jul 04 '22 21:07 ericcornelissen

I removed some log.Fatals from the code, so this shouldn't crash the app anymore.

dlvhdr avatar Jan 07 '23 11:01 dlvhdr

Just tested v3.6.0 and can confirm this fixed the problem, thanks! :+1:

ericcornelissen avatar Jan 13 '23 19:01 ericcornelissen