gistpad icon indicating copy to clipboard operation
gistpad copied to clipboard

Issue when viewing my own Gists on GitHub Enterprise

Open mcmans opened this issue 5 years ago • 12 comments

I'm using oauth token with gist selected i can see starred gists, although when viewing my own gists it displays the html for my github enterprise login page (displaying Sign in via LDAP · GitHub in the html). I've tried creating them from gistpad and its the same results, although the gist appears okay in github enterprise.

mcmans avatar Jan 09 '20 01:01 mcmans

@mcmans Hmm, that is strange! So you signed in to GistPad, and the tree view displays the correct list of gists? But when you try to open one, it displays the HTML content for the login page? If you expand the gist node, does it show the right list of files? But if you click on any of them, you see the HTML content for the login page?

Out of curiosity: what did you set the gistPad.apiUrl setting to? It needs to be something like https://[YOUR_HOST]/api/v3, so I'm wondering if it's missing part of the path for your GHE instance?

lostintangent avatar Jan 09 '20 18:01 lostintangent

Yes, that's correct. I added a gist from gistpad today and could see it in gistpad/vscode after i added it. I've now tried to access it and can see it in the tree view but the content is html for github enterprise.

Yes the apiUrl setting i've got is the same as you mentioned, with my github enterprise address. I can get authenticated and display the tree view and also strangely can access gists that i've got starred that aren't mine.

mcmans avatar Jan 09 '20 19:01 mcmans

I have the exact same issue. In addition:

  • "copy GitHub URL" gets a github.com URL: https://gist.github.com/<myuser>/<gist_id> (not GHE URL)
  • "view GIST on GitHub" opens a github.com URL (not GHE URL)

@lostintangent - what do you use to open the content of the files within the gist? Is it different between gists that are starred?

ojacques avatar Feb 13 '20 09:02 ojacques

I'm having this issue as well. I have a terraform file I've had up on github enterprise previously but when connecting to gist on GHE I get "Initiating SAML Single Sign-On" like its ignoring my personal access token


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">



  <title>Initiating SAML single sign-on</title>
  <meta http-equiv="refresh" content="0;url=https://login.microsoftonline.com/<gibberish>/saml2?

<TRUNCATED>


  </body>
</html>

Any files I create locally with gistpad appear just fine up on GHE so authentication is taking place successfully with my PAT.

image

ryanpodonnell1 avatar Mar 05 '20 21:03 ryanpodonnell1

Same issue with me

dancivitarese avatar Jun 02 '20 15:06 dancivitarese

Same exact issue here. Anyone figure out how to display actuals gists instead of the html outputs?

robbyki avatar Sep 12 '20 10:09 robbyki

Any thoughts on the potential solution to this? Would love to use gistpad for our day to day collaboration but this weird issue where it just displays the html prevents me from being able to use it at all.

robbyki avatar Oct 05 '20 17:10 robbyki

I need to get access to a GHE instance so that I can actually try to repro/fix this. Apologies for the delay here!

lostintangent avatar Oct 07 '20 03:10 lostintangent

I am using v0.4.1 of gistpad and I don't see the gistPad.apiUrl option anywhere has it been removed? Thanks

salmr0 avatar May 13 '22 15:05 salmr0

Facing the same issue as @salmr0. I then manually set gistpad.apiUrl in the settings json, but is has not effect.

image

zwo-bot avatar May 25 '22 09:05 zwo-bot

See #293

carlocardella avatar Jun 15 '22 19:06 carlocardella

I had a try with this extension, and a few others - and see this very issue.

I think it may be down to using a mix of API calls & regular page requests - at least on our GHE. Unlike public github, any other http request to GHE will require authentication

API requests seem to work fine with an API token, as expected, but as soon as you to to anywhere outside the 'api' endpoint, you get into the SAML authentication flow

planetf1 avatar Oct 02 '23 10:10 planetf1