Skip to content

getting this working with github enterprise #50

Open

Description

@saraf

I have set up GH Enterprise (trial for 45 days) on a VM.

Am setting the ENV variables and running strider as follows:

PLUGIN_GITHUB_API_ENDPOINT="http://192.168.56.105/api/v3" DB_URI="mongodb://strider:devpass@localhost/strider" DEBUG=superagent,strider-github:* node ./bin/strider --no-cluster

When trying to add a Github account gets me to an error page

2015-08-20T07:25:52.301Z - error: InternalOAuthError: Failed to fetch user profile
    at /noderoot/strider-github/node_modules/passport-github/lib/strategy.js:95:19
    at passBackControl (/noderoot/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:123:9)
    at IncomingMessage.<anonymous> (/noderoot/strider-github/node_modules/passport-github/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:142:7)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

So, what are the steps needed to get this working with github enterprise?

Activity

  1. saraf commented on Aug 20, 2015

    @saraf
    ContributorAuthor

    gh enterprise

  2. knownasilya commented on Aug 20, 2015

    @knownasilya
    Member

    I'm not aware if anyone has ever used Github Enterprise with Strider successfully, if they have, then it looks like a possible API change?

  3. saraf commented on Aug 20, 2015

    @saraf
    ContributorAuthor

    I saw a couple of commits - 39345dd
    and
    0abde9a
    (however, parts of those commits are now gone from the code - in d404010)

    Also saw - http://strider.readthedocs.org/en/latest/intro.html#github-github-enterprise-bitbucket
    and, a reference in the code - https://github.com/Strider-CD/strider-github/blob/master/lib/api.js#L406-L409
    (However, this code is unlikely to work - since we do not get a uri in the res.request anymore.)

    Is it okay to then remove those lines in api.js that are dead - so that someone who will implement github enterprise support will have a clean start?

  4. knownasilya commented on Aug 20, 2015

    @knownasilya
    Member

    Can you add a // TODO: add enterprise support line where you remove those lines? Thanks.

  5. saraf commented on Aug 21, 2015

    @saraf
    ContributorAuthor

    done!

    On Thu, Aug 20, 2015 at 11:35 PM, Ilya Radchenko notifications@github.com
    wrote:

    Can you add a // TODO: add enterprise support line where you remove those
    lines? Thanks.

    —
    Reply to this email directly or view it on GitHub
    #50 (comment)
    .

  6. apiv commented on Nov 18, 2015

    @apiv

    With some local modifications, I've gotten strider-github to connect to our enterprise github server. I'm working on making more appropriate modifications right now, and should have a pull request up in the next few days.

    Basically, what needs to be done:

    • api.js:423 - here we are assuming that the team id is the /a/b/this. All enterprise api urls start with /api/v3, so all we need to do is add a replace('/api/v3/', '') to 421.
    • webapp.js - the appConfig object needs to use the environment variable overrides, if defined
    • all situations where github.com is used need to be made dynamic, to either use the environment override or github.com.
    • Docs need to be updated with steps on setting up the app, etc.

    Anyways, I really like the Strider-CD project so far. It's a huge step up from jenkins, and has a UI that I can actually... use.

    P.S.

    Have we considered using an external library for the github api interface? There are a few npm packages out there that take care of connecting to the github api with OAuth. Perhaps we could leverage one of these packages instead of having all of the api call code in-house? The package I'm thinking of is octonode, which supports everything that this project needs right now. Just an idea, let me know what you think.

  7. knownasilya commented on Nov 19, 2015

    @knownasilya
    Member

    Glad to have you onboard @apiv! Looking forward to your PRs.

    We already have an issue about using a github API module here: #1 but we would still need to keep the gitane module around. If you want to tackle this, go for it. I'll try to help as much as possible.

  8. apiv commented on Nov 19, 2015

    @apiv

    Cool, I've made #56 to add enterprise support without the API refactor. I still want to take a shot at refactoring the API to use octonode, I'm just still getting acquainted with passport and the Strider-CD api. I might have some questions along the way, so I'll open a new issue for 'Use octonode' when I get started.

  9. apiv commented on Dec 7, 2015

    @apiv

    #56 merged, this issue should be all set to close.

  10. knownasilya commented on Dec 7, 2015

    @knownasilya
    Member

    I'll close this once I release the GE changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions