-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Implement GitHub Enterprise authn provider #115940
Implement GitHub Enterprise authn provider #115940
Conversation
Awesome! |
I was able to test the changes using the configuration here and I can confirm that it works very well with the GHE instance we use at work. |
I can also confirm that after following the instructions from microsoft/vscode-pull-request-github#1793 (comment) this works with our GitHub Enterprise Server. |
Thanks @kabel for picking this up, this is really great! I haven't had time to review this yet, but getting this in is on my to do list |
I can also confirm that after following the instructions from microsoft/vscode-pull-request-github#1793 (comment) this works with our GitHub Enterprise Server.
|
const json: { verifiable_password_authentication: boolean, installed_version: string } = await result.json(); | ||
|
||
/* __GDPR__ | ||
"ghe-session" : { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assume this would be valuable information to see where users are coming from. I don't know the schema for GDPR, so adjust as necessary.
@RMacfarlane what needs to happen to get this and #2468 pulled in? |
I just need to review and merge them, I am holding off on doing this since we are in the middle of our stabilization period for the next release where we do not take in new features. We should create our release branch on Friday and I will review after that |
Awesome - very excited for this to get it. Feel free to ping me if you need something validated against a GHE 2.22 server and I'll do my best to help. |
I was able to test the changes using microsoft/vscode-pull-request-github#1793 and confirm it works very well with our GHE instance |
Bumping, I would also love if this got merged and soon released 🙏 |
@RMacfarlane is there space in this iteration to review and merge this? |
Adds an additional provider to the github-authentication extension that leverages the same code with minor modifications. A configuration item has been added for users to provide the URI of their GHE instance. This allows GitHub API related extensions to easily integrate with either GitHub.com or their on-premise installations.
@RMacfarlane any plans to merge this soon? |
Uses a new, proposed alternative authentication provider (switch) to handle authentication and API queries. Fixed microsoft#1793, microsoft#2282. Depends on microsoft/vscode#115940
I'm super excited for this feature. I use GHE every day for work, and will use the pull request extension so much more when I can pair it with GHE. Can't wait to see this merged! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @kabel!
], | ||
"contributes": { | ||
"commands": [ | ||
{ | ||
"command": "github.provide-token", | ||
"title": "Manually Provide Token" | ||
"title": "GitHub: Manually Provide Token" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of changing the title to include "GitHub", there's another property called category
that could be used
As of the new PR merge what's the right way to configure this? |
I have the same question, how can I configure the GitHub enterprise? |
I would imagine there will be some updated wiki, documentation once this feature bakes into the official release process. That said, it's only available through the Insiders version 1.57 from 2021-05-10 or later. If your question resolves around how this integrates with the GitHub Pull Requests and Issues extension, you will also need to use the nightly build until an official release. Assuming you have the right version of things installed, you can set the configuration as shown in step 4 of my preview releases. In all cases, the authentication to Enterprise relies on a Personal Access Token (PAT), that must be manually generated and pasted into the appropriate prompt when you interact with a configured enterprise remote repository. Example: |
@kabel Thanks for the help! I have installed the nightly build version and I have put in settings.json ("github-enterprise.uri": "https://github.XYZ.com",) but how can I add my token to this configuration? |
Thanks so much for the detailed instructions! I think step 6 was critical. I ended up restarting vscode before I saw your instructions and that seemed to do the trick. |
@RMacfarlane You could copy this straight into the wiki 😄 |
It worked @kabel!!! Thanks for all the help! :D |
I grabbed the latest Insider build, and set |
Make sure you have the nightly of the extension as well |
That did it - thank you @catskul! I knew I was missing something obvious. |
Latest test seems to have errors
I can see the list of PRs but clicking on the dropdown shows nothing. Extension output is as follows:
Github Authentification Output:
Enterprise version is: v2.22.4 @kabel do you know why the above errors are happening? Is GHEP now out of sync with the extension again? |
@jasonwilliams I had similar errors on our GHE instance. Based on the change log, these fields were introduced on 2020-09-23. I guess you have to upgrade the GHE to a version after that. |
Opened a tracking issue at microsoft/vscode-pull-request-github#2772 for the schema related errors. Gotta love GraphQL API version fragmentation. We'll see how hard it will be to keep up with Enterprise support pattern. My enterprise upgraded to GHE 3 and it's seems to be working fine. |
If you arrived here looking for GitHub Enterprise support in the GitHub Pull Requests and Issues extension, please see the wiki. The TL;DR is that GitHub Enterprise is now tested and supported by the project maintainers. |
👋 Note from the maintainers: If you arrived here looking for GitHub Enterprise Server support in the GitHub Pull Requests and Issues extension, please see the wiki. GitHub Enterprise is now tested and officially supported (since 0.51).
Adds an additional provider to the github-authentication extension that leverages the same code with minor modifications. A configuration item has been added for users to provide the URI of their GHE instance.
This allows GitHub API related extensions to easily integrate with
either GitHub.com or their on-premise installations.
This PR fixes microsoft/vscode-pull-request-github#1793
Also fixes #112043
Testing requires access to a GitHub Enterprise instance.