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

Support for On-premise Solutions #11

Closed
ghost opened this issue Sep 8, 2015 · 7 comments
Closed

Support for On-premise Solutions #11

ghost opened this issue Sep 8, 2015 · 7 comments

Comments

@ghost
Copy link

ghost commented Sep 8, 2015

Should this module support on-premise solutions such as on-premise instances of GitLab, or GitHub Enterprise?

@ghost
Copy link
Author

ghost commented Sep 8, 2015

@raido
Copy link

raido commented Sep 11, 2015

I am intrested in this too.

@jokeyrhyme
Copy link

jokeyrhyme commented Dec 20, 2016

I've been wondering whether this can be done by making an HTTP request to the host and inspecting the headers?

  • GitLab: curl -ILv https://gitlab.com/explore: response has a Set-Cookie header for the "_gitlab_session" cookie (confirmed the same for self-hosted)

  • GitHub: curl -ILv https://github.com: response has X-GitHub-Request-Id header (no idea about enterprise / self-hosted)

  • BitBucket: curl -ILv https://bitbucket.org/account/signin/: plenty of "bitbucket" references in the response body (HTML)

The tricky part about self-hosted repositories is that the hosts / URLs could have nothing to do with the git hosting service, so we'd need to query something to figure it out.

@iarna
Copy link
Contributor

iarna commented Mar 17, 2017

While on premise solution support would be pretty cool, I'm pretty sure there's no way to do it. Having to do a capabilities check of a server is not an option for this module, however.

As I don't believe this is possible, I'm going to close this, but feel free to continue discussing it (and if you do figure something out, open up a new issue!)

@mehulkar
Copy link

@iarna 👋. I'm jumping in late here, but could explain why there isn't a way to do it? I'm looking in particular at the fromUrl function. It looks like it just parses a string, so if we ignore the host and assume the rest of the path is in GH format it should be possible?

@nicolechung
Copy link

Late to this, but I have a question...is it possible to add your own host with hostedGitinfo.addHost('enterpriseHost', ...hostData)?

If so, I think this would suit my needs and I'd be happy to PR to update the docs with this.

@nicolechung
Copy link

nicolechung commented Jun 21, 2023

I think it would require exporting maybeJoin and maybeEncode however...looks like all the hosts use these helpers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants