+
Skip to content

Unable to connect to Enterprise Github with 302 Redirect or getaddrinfo ENOTFOUND #5

Closed
@Hartimer

Description

@Hartimer

I'm unable to use this with my enterprise github instance.

Here are my configs:

var goptions = {
    git_token: '<mytoken>',
    git_repo: 'owner/myrepo',
    git_prid: 1,

    jshint_status: 'error', // Set status to error when jshint errors
    jscs_status: 'failure',  // Set status to failure when jscs errors

    git_option: {
        version: '3.0.0',
        protocol: 'https',
        host: 'github.mydomain.net',
        debug: true
    }
};

gulp.task('postcomment', function () {
    github.commentToPR('Please ignore this comment', goptions,
        function(s, rep) {
            console.log('reply from request', s, rep);
        }
    );
});

This does not use the token at all, returning reply from request null <html><body>You are being <a href="...">redirected</a>.</body></html>

In another place where I interact with the Github API I actually use github.mydomain.net/api/v3/. If I try to use this I get

[error] getaddrinfo ENOTFOUND github.mydomain.net/api/v3/ null <myusername>
reply from request { [Error: getaddrinfo ENOTFOUND github.mydomain.net/api/v3/]
  defaultMessage: 'Internal Server Error',
  message: 'getaddrinfo ENOTFOUND github.mydomain.net/api/v3/',
  code: '500' } undefined

Running the exact same request through PostMan works perfectly. I'm using:

  • Node v0.12.7
  • Npm 3.5.3
  • Gulp 3.9.1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载