microsoft / vscode-remote-repositories-github

Quickly browse, search, edit, and commit to any GitHub or Azure Repos repository directly from within Visual Studio Code.
Creative Commons Attribution 4.0 International
200 stars 97 forks source link

Make it work with a private GHES instance #4

Open tomasaschan opened 3 years ago

tomasaschan commented 3 years ago

Is it possible to make this extension work with Github Enterprise servers?

I have a colleague who keeps complaining about wanting full editor support for PR reviews, so this looked like exactly the thing we need in our team, but since we work with a private GHE instance, I can't figure out how to actually open a PR with this extension. Is it possible? If not, could you make it possible, pretty-please? :)

rhires commented 3 years ago

I'd like to echo some of the original comment, but make this a broader request - I use git on azure devops (or whatever the latest name is), and because this is originally configured for github, naturally I can't access my repos using this extension. It would be great if I could access my git repo wherever it lives...

neilenns commented 3 years ago

Agreed, please support this for GHE deployments. It'd be so useful to look into git repos scattered across the project when you just want to check something.

GitMensch commented 3 years ago

I'd like to echo some of the original comment, but make this a broader request - I use git on azure devops (or whatever the latest name is), and because this is originally configured for github, naturally I can't access my repos using this extension. It would be great if I could access my git repo wherever it lives...

This is not what you should expect from this extension - it is solely about GitHub as posted in https://github.com/microsoft/vscode-remote-repositories-github/issues/6#issuecomment-860836772

a GitHub published extension tied to the GitHub service

... but this issue was about GHE - Github Entrerprise, which, as a GitHub service, is part of the target. ... and the vscode built-in Git SCM integration already allows you to access the git repo wherever it lives since years.

rhires commented 3 years ago

@GitMensch - the last thing you said makes no sense in the context of this extension. Besides, Azure Devops is also a Microsoft product, so I'm not seeing why MS wouldn't also want to make the extension compatible with their other cloud products.

GitMensch commented 3 years ago

the last thing you said makes no sense in the context of this extension

Doesn't it? The "last thing I've said" was relate to the request "I can't access my repos using this extension. It would be great if I could access my git repo wherever it lives" and I've said that this extension is not needed for "access git repo" at all.

Besides, Azure Devops is also a Microsoft product, so I'm not seeing why MS wouldn't also want to make the extension compatible with their other cloud products.

Because this extension is, as the referenced comment says, a GitHub only extension, explicit using GitHub api (instead of / additional to git commands). [I'd prefer a MIT-Licensed extension with source available and the option to integrate other hosting sites API, possibly foremost Gitlab, but that seems unlikely to happen].

My conclusion from the Microsoft employee comment is:

eamodio commented 3 years ago

Thanks for the suggestion -- we do want to provide support for GitHub enterprise (not sure which versions yet though).

As for Azure Repos -- this will be supported (we are currently working on this). It's even mentioned in the README:

The Remote Repositories extension lets you quickly browse, search, edit, and commit to any remote GitHub repository directly from within Visual Studio Code, with support for Azure repos coming soon.

rhires commented 3 years ago

That’s great! Thank you! Also…looks like I should read a bit more :-)

On Jun 15, 2021, at 4:29 PM, Eric Amodio @.***> wrote:

Thanks for the suggestion -- we do want to provide support for GitHub enterprise (not sure which versions yet though).

As for Azure Repos -- this will be supported (we are currently working on this). It's even mentioned in the README:

The Remote Repositories extension lets you quickly browse, search, edit, and commit to any remote GitHub repository directly from within Visual Studio Code, with support for Azure repos coming soon.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-remote-repositories-github/issues/4#issuecomment-861809903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC76XZJKQLG6L73Y2U3I3SLTS6Z3PANCNFSM46QWEBVQ.

ghost commented 2 years ago

According to https://github.com/microsoft/vscode/pull/115940 this support was implemented a long time ago. What happened to it? This is a great feature. But if I can only use it to log into github.com then it is totally wasted on me and my organization. I am currently onboarding 160+ people to GHE. Please enable this feature for github.ibm.com (or better yet allow us to specify whatever server we want in github-enterprise.uri

ghost commented 2 years ago

BTW - This is what the other issue said: "2. Is GitHub Enterprise supported? GitHub Enterprise has limited support beginning in version 0.27.0 of the extension, thanks to community member @kabel. Our team still does not have access to Enterprise instances to test with, so there are likely to still be some issues, particularly in areas around opening or generating GitHub links. We welcome any help on improving our support.

VS Code version 1.57 or above is required to use this. At the time of this writing, this is the VS Code Insider's version, which can be downloaded here and used side-by-side with the stable version of VS Code. The changes to the extension are only available in the nightly version of the extension right now, but should be released to stable in June 2021. To use the nightly version of the extension, please make sure that the stable version of the extension is uninstalled or disabled - they will conflict when simultaneously enabled.

To sign in with GitHub Enterprise, update the github-enterprise.uri setting in VS Code to your server URL. You can then use the Accounts icon to start the sign in flow, and you will be asked to provide a Personal Access Token. The extension uses 'read:user', 'user:email', 'repo' scopes, so create a PAT with these permissions. Steps for signing in can be found here: https://github.com/microsoft/vscode/pull/115940#issuecomment-838838680"

joyceerhl commented 2 years ago

@rdboenig To make sure we are on the same page:

  1. https://github.com/microsoft/vscode/pull/115940 implements support for signing into a GitHub Enterprise account in VS Code in the GitHub authentication extension that is built into VS Code.
  2. The text you pasted above is from the GitHub Pull Requests and Issues extension. GitHub Enterprise support should work for the GitHub Pull Requests and Issues extension. If you are experiencing an issue with GHPRI support, please file an issue at https://github.com/microsoft/vscode-pull-request-github
  3. This repository is for the GitHub Repositories extension, which allows you to browse GitHub repositories without cloning them locally. If you are looking for the ability to browse GitHub Enterprise repositories without cloning them locally, this support has not yet been implemented.
ghost commented 2 years ago

Thank you for the details. Sorry to have mixed so many issues. My focus is on number 3. I want to be able to access GHE repositories directly through VSC WITHOUT the need to clone them. Thank you.

BTW - Great job. Amazing product. Thank you for all of your support.

ghost commented 2 years ago

@joyceerhl Can you comment on this request? Do you have plans to add this support? Do you need more customers to request this support to get it prioritized? I see there are several of us that have asked for this support. But I am guessing the current requests are not sufficient.

joyceerhl commented 2 years ago

There are a few complications:

joyceerhl commented 2 years ago

Also FYI @rhires, we now support browsing Azure Repos without cloning through the Azure Repos extension which is also bundled by default on https://vscode.dev. We are looking for feedback on experimental write support in that extension: https://github.com/microsoft/vscode-remote-repositories-github/issues/117#issuecomment-1063000797

ghost commented 2 years ago

@joyceerhl Thank you for the detailed explanation. I understand your challenges. So I won't get my hopes up. I do have access to a tirekicker GHES and would be willing to run some tests if that would help make this a possibility. If not I totally understand. I am certain you have plenty on your plate as it is.

BananaAcid commented 2 years ago

While GHE is the request, why not allow any GIT server? (GITLab, GITea, ...)

joyceerhl commented 2 years ago

@BananaAcid the builtin git extension in VS Code works with any git repository because it uses the git executable on the user's machine. GitHub Repositories relies on calling GitHub APIs since git cannot run in web. Adding virtual repository support for GitLab etc would involve leveraging whatever API is exposed by those hosts.

BananaAcid commented 2 years ago

@joyceerhl AH i see, so the 'clone' method is an example of what you are referring to?

joyceerhl commented 1 year ago

@BananaAcid This is the GitHub Repositories extension and Azure Repos extension, which allows you to browse GitHub and Azure Repos repos without cloning them. So there's no cloning involved when you use this extension.

maxwellainatchi commented 1 year ago
  • I am waiting to get access to a GHES instance, so while in theory the Octokit client supports GHES just by swapping out the base URI used for API requests, right now I don't have the ability to test that anything works

@joyceerhl would it be possible to enable this behind an "experimental" setting? I would love to test this out myself.

jasonwilliams commented 1 year ago

There are a few complications:

  • I am waiting to get access to a GHES instance, so while in theory the Octokit client supports GHES just by swapping out the base URI used for API requests, right now I don't have the ability to test that anything works
  • I don't think we would want to get into the business of supporting all versions of GHES since the API changes between versions (see https://github.com/microsoft/vscode-pull-request-github/issues/2772 for example). We definitely wouldn't support any deprecated versions: https://docs.github.com/en/enterprise-server@3.4/admin/all-releases
  • The builtin GitHub Enterprise authentication provider in VS Code only supports a PAT auth flow at the moment, so there would be work for @TylerLeonhardt if we wanted to provide an auth experience that is on par with the current GitHub auth flow
  • If we wanted to integrate GHES support into vscode.dev or github.dev that is a whole other discussion with the embedders

I think with point 1, a few of us here can help you with feedback if you can release an experimental version that swaps the base URL. I don’t know how long it will take you to get an instance but we can test in the meantime. (We did something similar when @kabel added support to GHPRaI extension)

Point 2. The “Github issues and pull requests“ extension only support the latest major version (^3.2). It would make sense to be consistent with them for many reasons, the main one being that you both use the same auth provider.

Point 3. Correct me if I’m wrong but I think this is outside the scope of this extension. The “Github issues and pull requests” extension would have the same problem right now and I haven’t seen many complaints about it. I don’t think this is a blocker for this issue and would be a new request.

Point 4. Similar to point 3, it’s a nice to have but for the scope of this issue I’m not sure it’s needed right now. It doesn’t sound related to the original raised request to the point where it would be a blocker for this.

TylerLeonhardt commented 1 year ago

Point 3 is no longer applicable with the new GHES login flow added a couple months ago. 👍

jasonwilliams commented 1 year ago

It would be useful to have an experimental flag that allows some of us to "opt in" to changing the base URI to our own enterprise version. This would then allow us to feedback in this issue if there's any problems. I believe this is what https://github.com/Microsoft/vscode-pull-request-github did and it worked fine for them.

This is by far the most voted issue in this project.

RonnyKay commented 1 year ago

Hi @joyceerhl

is there any update on the Github Enterprise support ?

any update will be most welcomed.

Thank you :)

the-moog commented 1 year ago

We have about 9k users on GHE some of whom also contribute much to the GH public services and Linux/Open Source in general. Adding GHE to this extension would be a huge win. VSCode already supports Remote Auth for GHE. I would imagine, due to the license cost and investment required for GHE, that corporations would happily contribute towards the effort of enabling this extension for GHE. IMO it surely should be part of the core of VSCode/Remote.

joschwalb44 commented 11 months ago

Hi, I and the organisation I am working for would also really welcome the support for GHE (even better, for two different GHE instances). It would be game changer to support many small configuration as code repositories.

climenhaga commented 9 months ago

My company uses GHE for version control of our Salesforce orgs and Copado tool writes all the metadata to GHE. Occasionally we need to modify some of these files and they are too large to display in the GHE browser so need a quick and simple way to make these updates. Cloning the git repository in VS Code is overkill for these types of changes and adds a burden to our Salesforce admins who are not versed in Git operations.

jasonwilliams commented 1 week ago

@joyceerhl do you not work on this project anymore? This is the number one voted issue and has been for some time, is it possible to open source this if no one is willing to work on it? Maybe the community could have a version which works on GHES instances.