hosted-git-info icon indicating copy to clipboard operation
hosted-git-info copied to clipboard

Support non-public hosts such as GitHub Enterprise

Open rarkins opened this issue 7 years ago • 8 comments

I thought it would be best to break this out into its own issue.

Is it the intention to support non-public hosts like this?

e.g. its use might look like:

var info = hostedGitInfo.fromUrl("[email protected]:abc/def.git")

but could also look like:

var info = hostedGitInfo.fromUrl("[email protected]:abc/def.git")

There's nothing about the above that says "this is of type github" and it could just as easily be gitlab instead. But perhaps it's possible to at least return as much info as possible, e.g.

/* info looks like: { type: "unknown", domain: "code.mycompany.com", user: "abc", project: "def" } */

rarkins avatar Aug 17 '18 06:08 rarkins

You may be interested in #11 and this comment - https://github.com/npm/hosted-git-info/issues/11#issuecomment-287495178

hutson avatar Oct 16 '18 20:10 hutson

@hutson the solution above wouldn't solve the issue you're pointing to. But it would provide with a nice fallback. Would you accept a PR implementing the fallback?

dcyriller avatar Feb 18 '19 16:02 dcyriller

Would you accept a PR implementing the fallback?

I'm not with npm. You would need to ask them :sweat_smile:

hutson avatar Mar 18 '19 03:03 hutson

@iarna would it make sense?

(thank you @hutson)

dcyriller avatar Mar 18 '19 09:03 dcyriller

Having this issue here https://github.com/sindresorhus/np/issues/357 and would love to see it implemented!

privatenumber avatar Jul 30 '19 07:07 privatenumber

Hi I have solved this issue for me using an option flag {allowOtherHosts: true}. On interest pls check this fork https://github.com/spurreiter/hosted-git-info/tree/feature-allow-other-hosts. As of #11 comment I am not sure if it's worth the PR. Any advise?

spurreiter avatar Sep 28 '19 10:09 spurreiter

the Gitlab Enterprise hosts is not supported too, like: 'git+https://oauth2:[email protected]/PATH/TO/PROJECT.git#v1.0.5'

AnoLu avatar Oct 14 '21 06:10 AnoLu

I think this issue can be closed. In addition to #11, the maintainer @iarna commented more explicitly on #23 here that enterprise, self-hosted git hosts are out of scope for the tool named hosted-git-info.

dbrakman avatar Jan 04 '23 06:01 dbrakman