Strider-CD / strider-github

Github provider for strider
25 stars 34 forks source link

Document github enterprise usage #23

Closed niallo closed 8 years ago

niallo commented 9 years ago

This works with github enterprise - we should add instructions to the README.

geekflyer commented 9 years ago

Hi @niallo,

I'm trying to use Strider with Github enterprise, but it doesn't work. Apparently in this line: https://github.com/Strider-CD/strider-github/blob/master/lib/api.js#L11-L12 the endpoint URLs are initialized. However during the initialization of the module the concerning environment variables (e.g. process.env.PLUGIN_GITHUB_API_DOMAIN) are not defined, even though I've exported them before the start of strider. As a result those local variables GITHUB_DOMAIN etc. are being initialized incorrectly with the defaults.

More surprisingly during the execution of functions, e.g. getRepos the environment variables (process.env.PLUGIN....) are well defined, but getRepos does not access those - instead it accesses the local variables GITHUB_DOMAIN etc. which are incorrectly initialized. The result is that the github requests are still pointing to the public github domain and not gh enterprise, hence it doesn't work (ENOTFOUND err etc.).

Last but not least in this file the github domain is still hardcoded, so it definately can't work: https://github.com/Strider-CD/strider-github/blob/master/lib/index.js#L15

I actually got it working with Strider 1.5 before, by hardcoding my URIs somewhere in the plugin and now I was trying to upgrade to 1.6.1 where the github enterprise patch / pull request is merged.

So the question is, am I doing something wrong here, or is the github enterprise support simply buggy and does not work?

paul42 commented 9 years ago

I don't know if this is helpful but one minor difference I noted was github's public API is in a different 'location' than enterprise API, curl -i https://api.github.com/users/octocat/orgs against public curl -i https://github.ENTERPRISEHOST.com/api/v3/ against enterprise - and you must auth everything

samartioli commented 9 years ago

I think Strider should stop saying it works with GitHub Enterprise until it actually works with GitHub Enterprise. As far as I can tell right now it does not.

knownasilya commented 9 years ago

@samartioli I think @niallo was mistaken in this case, but we don't otherwise advertise that we support GH enterprise.

samartioli commented 9 years ago

http://strider.readthedocs.org/en/latest/intro.html#github-github-enterprise-bitbucket