Vscode-pull-request-github: Its possible connect to github enterprise

Created on 12 May 2020  路  53Comments  路  Source: microsoft/vscode-pull-request-github

Hi, its possible configure extension with different github. (Use of github enterprise)

GitHubEnterprise feature-request

Most helpful comment

If you're willing to do some "beta" testing, I'd love to get some feedback on my PRs that add support back. You'll have make some adjustments to your config and shortcut to launch code.

  1. Change your shortcut to code.exe or code - insiders.exe to include the options --enable-proposed-api vscode.github-authentication
  2. Install the matching vsix builds from my branches (rename zip to vsix)

  3. Install the test integration vsix from my branches (rename zip to vsix)

  4. Set settings.json values for

    • "github-enterprise.uri": "https://domain-of-ghe.your-enterprise.tld"
    • "githubPullRequests.authenticationProvider": "github-enterprise" (not needed since 0.24.1-a1)

All 53 comments

It looks like they removed support for GHE with version 0.16.

It took me a bit of digging, and it doesn't look like there was any notification that this support was going away - but I don't pay close attention to the issues here.

I'm personally a bit confused about the reasoning (that they don't have resources to test against it). Especially since they appear to be using Octokit.rest which has first class support for GHE out of the box.

+1 I can no longer use this extension now that #1616 is in

I experienced this issue in 0.16. As interim, we could install the previous version 0.15.0 in VS Code

image

I read the change log on this. I can sympathize with the lack of hands to assist with development on the enterprise functionality.

That being said though, it's a no-go to do that. A "solution" is not to just use a previous version (v0.15). Many thousands of people whom use this extension are now effectively blocked from ever getting updates. You rip the rug out from underneath them.

A nicer scenario would have been to say "hey, we can't continue to develop on enterprise connectivity. But we'll leave in what we have in there now". Let the versions continue to advance, but don't rip this out from folks.

You leave lots of folks scratching their heads, wasting hours trying to figure out why their tooling isn't working. Only to eventually come here, and see this mysterious decision to pull the plug on GHE support.

I love this extension, 5-stars for sure. But the decision to do this is of 1-star quality.

I love this extension, 5-stars for sure. But the decision to do this is of 1-star quality.

+1

I'm really upset about this decision. GitHub Enterprise integration was extremely useful feature.
If there's not enough resources to test it, it'd prefer to have it buggy, than not to have it at all.

+1, very unhappy to see this feature go, would love to know if there鈥檚 any effort which can be made by the community to get it back

@Richard-Lynch fork?

I'm waiting for Github Enterprise support..............

Locked out as well. Don't have the JS chops to contribute the required code sadly.

This is tough. I used this constantly and now it is gone. Sure I can stay with the old version, but then I miss out on all the improvements that are sure to happen over time.

I鈥檓 happy to contribute back a fix/enhancement if a maintainer can give some guidance here on what would be acceptable?

Either extending the GitHub authentication provider extension to support enterprise, or creating a new GitHub Enterprise authentication provider extension to do same?

@RMacfarlane could you give any guidance? Is there an issue tracking this or is this something that isn't coming back for some reason?

For anyone who is following this ticket, it was mentioned in #1850 that this is being looked at by internal contributors to asses the viability of bringing back enterprise support, so we鈥檒l hopefully know more soon.

The official workaround right now is to downgrade to 0.15.0 wiki

Very much appreciated, thanks for the awesome project 馃榿

Comment in question https://github.com/microsoft/vscode-pull-request-github/issues/1850#issuecomment-642844191

Yeah, this is a non-starter for me. Left a review to that effect since that may get the attention of someone outside the developement team.

I'm inconvenienced by this since I can only use an old version now, but actually support this decision.

I imagine GHE is a minuscule amount of users, and reducing scope will be the best path forward to keep this extension maintained. Everyone who's inconvenienced by this should use their energy convincing their companies who are likely spending tens of thousands of dollars in GHE, to contribute to this extension and VSCode's authentication features. We can't expect a couple of contributors to do all the work without burning out.

I think a problem is the recent vscode architecture change around authentication providers has left an obscure path forward for someone looking to re-add support for enterprise.

Perhaps someone could do some research/exploration around solutions on how to get this done with the new auth.

A downgrade was recommended as a workaround, but this version finally stopped working with the latest version of VSCode.
Can't you do something about it?
Sorry this comment is a machine translation.

A downgrade was recommended as a workaround, but this version finally stopped working with the latest version of VSCode.
Can't you do something about it?
Sorry this comment is a machine translation.

It did? v15.0 seems to still connect to GHE just fine for me, even with the most recent VS Code update.

Any update on this? Is there any plan to put this on a roadmap for resolution?

@RMacfarlane Is there anything the community can do to enable GHE support?

This is just a drive-by comment since I am looking at this right now.

With https://github.com/microsoft/vscode-pull-request-github/commit/9f7d6a09447a611131591f1253b48c4eb6f79000#diff-a46298735cf7c583b6e833c09a3653e1R192, the implementation is dramatically simpler and relies on the builtin extension github-authentication. Here's what I think would need to occur to restore GHE support:

  1. Make the AUTH_RELAY_SERVER configurable: currently this is hardcoded to be vscode-auth.github.com (Example: https://vscode-auth.github.com/authorize?authServer=https://github.com/&callbackUri=vscode://GitHub.vscode-pull-request-github/did-authenticate&scope=read:user%20user:email%20repo%20write:discussion).
    AUTH_RELAY_SERVER is at https://github.com/microsoft/vscode/blob/1961260ef3f6993b9c57f7dadccb00f423a1c1b2/extensions/github-authentication/src/githubServer.ts#L16. This AFAIK is closed source. It needs to be open-sourced so that GHE customers can stand one up, or new code added to the github-authentication extension that facilitates GHE support via personal access tokens somehow (probably the preferred option).
  2. Make the graphql client configurable. Currently this is hardcoded to api.github.com. https://github.com/microsoft/vscode-pull-request-github/blob/f821fc0180415d96541c08f4e15868899a79be7a/src/github/credentials.ts#L177-L184

Again, that's just a driveby look at the problem and I could be completely off-base. Hopefully @RMacfarlane can shed more light on the blocking issues.

Just to add to this discussion, even if it was provided as "best effort" support for GHE, that'd be preferable to just removing the feature entirely, if possible.

Based on what is said in the wiki (where the suggestion to downgrade to 0.15.x is made), is it possible to add a secondary "workaround" authentication mode that does what the 0.15 version did? Effectively requesting the GitHub (GHE) domain & a token which a user could generate and paste in to VSCode...

Seems that with the latest VSCode updates, 1.5 is no longer an option https://github.com/microsoft/vscode-pull-request-github/issues/2206 as we just get empty content

Since the plugin doesn't support GitHub Enterprise (GHE) and 0.15 no longer works, should someone purge all the GHE instructions from the wiki?

This is a pity. I was just going through a PR review from a coworker and thinking it would be really nice to be able to see his comments all inline in my code while I'm working on addressing them. Then I thought "Hey, somebody probably already thought that, let me see if there's an extension." Found this... and then found that like seemingly everything else in VS Code, it doesn't support GHE even if it did at one time." The lack of GitHub Enterprise support in VS Code GitHub plugins is really disappointing. I guess I should at least be glad that I didn't find this a few months ago to appreciate it, only to have it torn away.

Downgrading to 0.15 doesn't work for me either, so I assume it's fully broken at this point as suggested by a couple earlier posters? (no commands work, the panel is empty, I see no way to actually use it)

at least 99% of my work is against GHE. the fact it works with public github is merely "interesting" whereas the fact it is broken with GHE is a major blocker.

at least 99% of my work is against GHE. the fact it works with public github is merely "interesting" whereas the fact it is broken with GHE is a major blocker.

For anyone who might have missed it earlier in this long-running issue, there is a workaround while the devs sort this out:
image

  1. Find the extension in extension marketplace.
  2. Right click on it and choose Install another version...
  3. Choose 0.15.0
  4. When it's done installing, click the reload required button.
  5. Voila.

@WafflesMcDuff Version 0.15.0 doesn't work anymore with VS Code 1.53.0.

If you're willing to do some "beta" testing, I'd love to get some feedback on my PRs that add support back. You'll have make some adjustments to your config and shortcut to launch code.

  1. Change your shortcut to code.exe or code - insiders.exe to include the options --enable-proposed-api vscode.github-authentication
  2. Install the matching vsix builds from my branches (rename zip to vsix)

  3. Install the test integration vsix from my branches (rename zip to vsix)

  4. Set settings.json values for

    • "github-enterprise.uri": "https://domain-of-ghe.your-enterprise.tld"
    • "githubPullRequests.authenticationProvider": "github-enterprise" (not needed since 0.24.1-a1)

@kabel, I can confirm the extension works with our github enterprise server. I created several queries, closed/reopened the application several times and can successfully see all of the issues/PRs related to my searches. Also, I can still see the github.com project related info for my projects there.

I don't see the icon for the extension though. It just appears blank. My platform is Windows10 with native vscode installation.

I don't see the icon for the extension though. It just appears blank.

Bad packaging on my part that included some mainline fixes not production ready.

@kabel you have just earned my sponsorship (and a tip for @selcukduman too)

The icon is back and the extension works fine. I tested on the latest stable version (1.53.2).
Thanks @kabel. I appreciate the fix.

@kabel amazing work! I truly hope your solution will be merged soon

@kabel Just tested on my computer too and it works beautifully. Also working in WSL remote development. Great work

@kabel let me know if you need any further support or testing on my GHE. Hopefully this gets merged soon.

@kabel can also confirm, that it works under linux as well. Great Job :+1:

but it's not possible to make suggestions (not sure what's the root-cause for this missing feature is)

@bavarianbidi i don鈥檛 think that feature exists in general so it鈥檚 not related to this issue. I think there鈥檚 a separate issue for that.

@kabel, I can also confirm that after following the instructions from https://github.com/microsoft/vscode-pull-request-github/issues/1793#issuecomment-778269272 the extension works with our GitHub Enterprise Server. I can see pull requests in the drop down and do all the things i could before.

Looking forward to seeing this merged. I'm on linux and hoping it works there as well.

Screen Shot 2021-02-16 at 9 28 47 AM
I see this error trying to view PR descriptions.

details:

github authentication ext: 0.0.2a1
pull request extension: 0.23.1a2
GHE Server version: 2.19.3

happy to provide any more info.

This is working for me on Mac and VSCode Version: 1.53.2

So awesome!

I see this error trying to view PR descriptions.

details:

github authentication ext: 0.0.2a1
pull request extension: 0.23.1a2
GHE Server version: 2.19.3

@Talor-A
GHE Server 2.19 is well passed end-of-life. This is from GHE product doc for 2.20:
image

This was probably one of the reasons support was dropped for enterprise all together. The version fragmentation is too much to keep track of. Don't expect upstream authors to keep supporting product versions that have been discontinued.

@kabel thanks, guess I'll have to bug our GHE admins about updating 馃槄

And here's another successful beta test. Thanks a lot @kabel, this is very much appreciated. 馃殌
macOS 11.2.1
VS Code: 1.53.2
GHE: 2.22

@kabel When I create the issue, it's adding a blob url pointing to github.com as the domain instead of our github enterprise server in the issue body text. I can update it before creating the issue in the issue edit panel, so not a big problem, but just wanted to let you know.

Mac VSCode 1.53.2 . I did all of the above, starting VSCode from Terminal with code --enable-proposed-api vscode.github-authentication . When I first tried to log in, after tweaking the settings, it prompted me for a Personal Access Token and then, apparently, did nothing. The explorer view did not update, no error message or confirmation message. I tried clicking on "Login" again and didn't even get a prompt.

So being in IT, I closed Code and re-opened it. And without having to do anything else, the Issues and PR views were there and populated.

So it is working, but seemingly "something" happened the first time around that wasn't exactly right. I don't know if there are logs or anything that I might be able to send along, or if it's "good enough" since it seems to be working now.

As a note for anyone trying @kabel 's beta-test ... MS just dropped v0.24 of the official extension and it overwrote the VSIX. I uninstalled and then re-installed from VSIX and it's working again.

Perhaps we should add a link and updates to the wiki to point to this discussion so that more votes / eyes will see and support getting this wrapped up and merged.

@kabel I grabbed 0.24.1-a1 and installed it, but now VSCode is telling me that githubPullRequests.authenticationProvider is an Unknown Configuration Setting. Is that intentional? Do the "beta" instructions at https://github.com/microsoft/vscode-pull-request-github/issues/1793#issuecomment-778269272 need updating?

Do the "beta" instructions at #1793 (comment) need updating?

Sure. Since 388a937d9a4c290b628f812985f743e0726ea030, Both providers can be used at the same time. No need for a configured switch.

OK, cool. I had to add the GHE server and token to githubPullRequests.hosts but now it seems to be working again. :)

Also, it seems the --enable-proposed-api vscode.github-authentication switch is no longer required?

Any word on when the changes in https://github.com/microsoft/vscode-pull-request-github/commit/388a937d9a4c290b628f812985f743e0726ea030 and the like will make it into a release?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Velyks picture Velyks  路  3Comments

alexdima picture alexdima  路  3Comments

Simran-B picture Simran-B  路  4Comments

radu-matei picture radu-matei  路  3Comments

Tyriar picture Tyriar  路  4Comments