Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Its possible connect to github enterprise #1793

Closed
vaclavbenes opened this issue May 12, 2020 · 69 comments · Fixed by microsoft/vscode#115940 or #2468
Closed

Its possible connect to github enterprise #1793

vaclavbenes opened this issue May 12, 2020 · 69 comments · Fixed by microsoft/vscode#115940 or #2468
Labels
feature-request Request for new features or functionality GitHubEnterprise verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@vaclavbenes
Copy link

vaclavbenes commented May 12, 2020

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


👋 Note from the maintainers: If you arrived here looking for GitHub Enterprise Server, please see the wiki. GitHub Enterprise is now tested and officially supported (since 0.51).

@GABeech
Copy link

GABeech commented May 12, 2020

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.

@drayfar
Copy link

drayfar commented May 12, 2020

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

@deerawan
Copy link

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

image

@dvsoukup
Copy link

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.

@azinoviev
Copy link

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.

@Richard-Lynch
Copy link

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

@alexanderkjeldaas
Copy link

@Richard-Lynch fork?

@JunhwanPark
Copy link

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

@khepin
Copy link

khepin commented May 20, 2020

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

@neilenns
Copy link

neilenns commented Jun 1, 2020

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.

@Richard-Lynch
Copy link

I’m 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?

@Richard-Lynch
Copy link

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’ll 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 #1850 (comment)

@jnials
Copy link

jnials commented Jun 24, 2020

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.

@jeduan
Copy link

jeduan commented Jul 10, 2020

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.

@ProLoser
Copy link

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.

@deflis
Copy link

deflis commented Jul 17, 2020

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.

@dvsoukup
Copy link

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.

@neilenns
Copy link

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

@jasonwilliams
Copy link

jasonwilliams commented Aug 20, 2020

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

@pcj
Copy link

pcj commented Aug 30, 2020

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

With 9f7d6a0#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.
    const graphql = new ApolloClient({
    link: link('https://api.github.com', token || ''),
    cache: new InMemoryCache,
    defaultOptions: {
    query: {
    fetchPolicy: 'no-cache'
    }
    }

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.

@enigma0Z
Copy link

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...

@ggcatu
Copy link

ggcatu commented Oct 14, 2020

Seems that with the latest VSCode updates, 1.5 is no longer an option #2206 as we just get empty content

@RMacfarlane RMacfarlane added the feature-request Request for new features or functionality label Nov 10, 2020
@peterpk
Copy link

peterpk commented Mar 30, 2021

@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 #1793 (comment) need updating?

@kabel
Copy link
Contributor

kabel commented Mar 30, 2021

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.

@peterpk
Copy link

peterpk commented Mar 31, 2021

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?

@catskul
Copy link

catskul commented Apr 19, 2021

Any word on when the changes in 388a937 and the like will make it into a release?

@Ygilany
Copy link

Ygilany commented Apr 30, 2021

@RMacfarlane any plans to merge this soon?

kabel added a commit to kabel/vscode-pull-request-github that referenced this issue May 6, 2021
Uses a new, proposed alternative authentication provider (switch) to
handle authentication and API queries.

Fixed microsoft#1793, microsoft#2282.

Depends on microsoft/vscode#115940
@jasonwilliams
Copy link

@RMacfarlane RMacfarlane added this to the May 2021 milestone May 20, 2021
@meganrogge meganrogge added the verification-needed Verification of issue is requested label Jun 3, 2021
@connor4312
Copy link
Member

@jasonwilliams are you able to verify whether this works for you?

@jasonwilliams
Copy link

@jasonwilliams are you able to verify whether this works for you?

I was waiting for v1.57 to be released to test it, as I’m assuming that’s when I’ll be able to try it out?

@rzhao271
Copy link
Contributor

rzhao271 commented Jun 3, 2021

@jasonwilliams you should be able to test the changes using VS Code Insiders. You may need to use the following extension: https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github-insiders.

@jasonwilliams
Copy link

jasonwilliams commented Jun 4, 2021

@connor4312 @rzhao271

  • Installed VSCode Insiders (Version: 1.57.0-insider (Universal) Commit: 387e2f39ebbbf50d4b488f900b2a745972764015)
  • Installed pull request github nightly (Version: 2021.6.1983)
  • I set my enterprise URI, filling out "github-enterprise.uri" (I included the schema)
  • Then needed to restart VSCode
  • Then i signed in following @kabel's instructions here:
    Implement GitHub Enterprise authn provider vscode#115940 (comment)

I can see the list of PRs but clicking on the dropdown shows nothing.

Extension output is as follows:

[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Error: GraphQL error: Field 'viewerViewedState' doesn't exist on type 'PullRequestChangedFile'
[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Error: GraphQL error: Field 'viewerViewedState' doesn't exist on type 'PullRequestChangedFile'
[Info] Failed to get pull request review comments: Error: GraphQL error: Field 'path' doesn't exist on type 'PullRequestReviewThread'
GraphQL error: Field 'isOutdated' doesn't exist on type 'PullRequestReviewThread'
[Info] Error: GraphQL error: Field 'viewerViewedState' doesn't exist on type 'PullRequestChangedFile'

Github Authentification Output:

[Info  - 09:22:45.590] Getting user info...
[Info  - 09:22:46.204] Got account info!

Enterprise version is: v2.22.4

@alexr00
Copy link
Member

alexr00 commented Jun 4, 2021

I'm going to mark this issue as verified since we have several users who commented about their success in the PR comment thread.

@jasonwilliams thank you for trying this out. I'd love to provide you with some suggestion about what might be going wrong, but I'm entirely reliant on the community for enterprise support and test. There was some good discussion on how to get things working in the PR comments, which I can see you already found. I recommend commenting there to see if anyone has ideas!

@alexr00 alexr00 added the verified Verification succeeded label Jun 4, 2021
@jasonwilliams
Copy link

@alexr00 understandable, although now Microsoft is a parent to Github I'm surprised you cannot attain an enterprise instance for testing.

@Sunchock
Copy link

Sunchock commented Jan 7, 2022

Hello there, I would like to share with you my adventures using this plugin.

First, I've installed VSCode Insiders and GitHub Pull Request and Issues plugin. But when I wanted to install GitHub Pull Request and Issues Nightly Build too as mentionned before : a message in the market-place page tell us of Nightly Build is included in GitHub Pull Request and Issues previsionnal version (So may I have already get it ?). I've set the uri in the settings with my corporate ghe instance base url but it's change nothing.
Then when i want to log me. It stills redirect me to github.com and i don't know why.

So when i was to the webpage to log me on github.com. I took the original url and replace the last argument authServer (who it was 'https://github.com' again ..) by the same argument I put in the uri setting and .. it works !
Finaly i can connect using my GHE instance account but it was only the first step

In the second part, I had to generate a new token in my GHE account settings and use this token in VSCode Insiders regardless the token given in the webpage after the login.

And that's it ! (Finally !)

EDIT: I tested the same technique for classic VS Code but it didn't work

@cpatti97100
Copy link

Hi all and thank you for your hard work :)

any chance we can have a smooth flow for stable VS Code soon? I am still unable to use my company's GHE :(

@alexr00
Copy link
Member

alexr00 commented Feb 8, 2022

@cpatti97100 a new version of VS Code stable was released last week (version 1.64) and I released a new version of GitHub Pull Requests and Issues (version 0.36.0) last week too so you're probably good to go.

@wrslatz
Copy link

wrslatz commented Feb 8, 2022

Does login for GitHub Enterprise work without also logging into GitHub.com? I can't seem to get this to work with the latest versions. I'm happy to open a separate issue to troubleshoot further.

@cpatti97100
Copy link

Hey @alexr00 thank you for reaching out!

So at the moment I have Code Version: 1.64.1 (Universal) and GitHub Pull Requests and Issues 0.36.0

in settings I have

"github-enterprise.uri": "https://github.*****.com",

when I start the app and go the extension page, I see this

image

then I do the sign in flow into my private regular github account

image

and I end up in this state

image

then I click on sign in with github enterprise and it asks me for a token, but no web page with it ever opened

image

where should I get it?

Thank you!

@wrslatz
Copy link

wrslatz commented Feb 9, 2022

I was able to generate an access token in the GitHub Enterprise instance (under Developer Settings for your user).

The login to GHES seems to work in my case (from the GitHub Authentication logs), but the extension still can't recognize or pull the projects for my workspaces (I see logs saying the repo isn't recognized and can't find the remotes).

@cpatti97100
Copy link

I was able to generate an access token in the GitHub Enterprise instance (under Developer Settings for your user).

The login to GHES seems to work in my case (from the GitHub Authentication logs), but the extension still can't recognize or pull the projects for my workspaces (I see logs saying the repo isn't recognized and can't find the remotes).

success! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality GitHubEnterprise verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet