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

Cannot use https github enterprise #20

Open
elanciel opened this issue Aug 17, 2016 · 16 comments
Open

Cannot use https github enterprise #20

elanciel opened this issue Aug 17, 2016 · 16 comments

Comments

@elanciel
Copy link

Hi I cannot use the https github enterprise github mode...

Is it normal or a bug ?

Regards.

Richard.

@elanciel
Copy link
Author

elanciel commented Sep 7, 2016

Allo?

@h13i32maru
Copy link
Member

Sorry for late reply.

Jasper supports https GHE.
Please tell me your configuration.

@elanciel
Copy link
Author

elanciel commented Dec 9, 2016

I found the issue: Jasper does not handle cert files.

@h13i32maru
Copy link
Member

Please check v0.2.4-beta.1
https://jasperapp.io/beta.html

@aereal
Copy link

aereal commented Mar 14, 2017

I'm tried and get failed to use Jasper app with GitHub enterprise.

Configure the GitHub enterprise host, input the personal access token, click the OK button, then I get only invalid setting message from Jasper app.

What can I do to use the app?

My environment:

  • Jasper app 0.2.5
  • OS X 10.12.3
  • GitHub enterprise
    • with self-signed certificates

@azu
Copy link

azu commented Mar 22, 2017

I have met similar issue.
Launch jaspmer and forever loading....

  • Jasper app 0.2.5
  • OS X 10.10.6
  • GitHub enterprise: http

I've tried run jasper by electron command and see following error output.

$ npm i -g electron
$ electron /Applications/Jasper.app/Contents/Resources/app.asar
[N] [2017-03-22T10:44:50.632Z] [index.js:52:23] user data path: /Users/user/Library/Application Support/jasper
[N] [2017-03-22T10:44:50.638Z] [index.js:53:23] app data path: /Users/user/Library/Application Support
[N] [2017-03-22T10:44:50.639Z] [index.js:54:23] config path: /Users/user/Library/Application Support/jasper/io.jasperapp/config.json
2017-03-22 10:45:13.357 Electron Helper[64464:8552993] Couldn't set selectedTextBackgroundColor from default ()
[N] [2017-03-22T10:45:24.353Z] [GitHubClient.js:143:29] [request] /user
{ Error: connect ECONNREFUSED xx.xx.xxx.xx:443
    at Object.exports._errnoException (util.js:1022:11)
    at exports._exceptionWithHostPort (util.js:1045:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: 'xx.xx.xxx.xx',
  port: 443 }

I've used http:// url, but jasper access to https?

@elanciel
Copy link
Author

jasper works fine with http and https, the main issue is when you needs certificates to be trusted on your github enterprise landscape. I found a work around that inject the certificates (2 lines of code) but we really need a proper development on the top of it.

Hope jasper developers will read this :)

@h13i32maru
Copy link
Member

@azu

but jasper access to https?

Jasper uses the following code.

      const options = {
        hostname: this._host,
        port: this._https ? 443 : 80,
        path: requestPath,
        headers: {
          'User-Agent': this._userAgent,
          'Authorization': `token ${this._accessToken}`
        }
      };

      const httpModule = this._https ? https : http;

      this._log(path, query);
      const req = httpModule.request(
        options,
        this._onResponse.bind(this, resolve, reject)
      ).on('error', (e)=> reject(e));

I think that other cause in this bug.

@h13i32maru
Copy link
Member

@elanciel Thanks for the comment.

I found a work around that inject the certificates (2 lines of code)

Could you tell me the code?

@azu
Copy link

azu commented Jul 3, 2017

Maybe, this is other issue.

I've set GHE setting and launched jasper, then loading forever.

image

Does jasper use rate_limit api?
I've noticed that some GHE enviroment has disabled rate_limit feature.
If Rate Limit feature have been disabaled, get 404 response.

@hiroshis
Copy link

hiroshis commented Jul 4, 2017

I'm trying Jasper under the similar situation as follows, but I can't.

  • Jasper app 0.3.1
  • Windows10
  • GitHub enterprise
    • with self-signed certificates
  • Coporate Proxy
    • with authentication

I also tried with electron command with --proxy-server and --ignore-certificate-errors options, but Jasper said as 'invalid setting.'
In the console, following message is shown.
[E] [2017-07-04T09:42:12.779Z] [rpc-server.js:249:18] self signed certificate

Is it possible to avoid the error?

@hiroshis
Copy link

hiroshis commented Aug 2, 2017

Finally, I could connect in my environment.

All things what I did as follows:

  1. Add the following code before Jasper throws requests to GitHub.
    process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
  2. Re-packing apps.asar file.
  3. Run Jasper as usual.
  4. In the 'GitHub Enterprise' configuration screen, set api/v3 as 'pathPrefix'.
    (Default value is /api/v3)

I hope this will help.

@h13i32maru
Copy link
Member

@azu Jasper fixed to work on http GHE. Please update to v0.4.0 👍

@niwatako
Copy link

@h13i32maru Has this been fixed?
#20 (comment)

I'm in the same problem.
When I click OK button, it seems to do not send request. (I used proxy to check it.)
So the problem occurs before sending request, I think.

Is there any validation rule for host format?

My environment:

Jasper app 0.5.0
OS X 10.13.3
GitHub enterprise
with self-signed certificates

@tborychowski
Copy link

tborychowski commented Jul 10, 2020

I'm on 0.9.2, and this still doesn't work. Pity.

@sfrankle
Copy link

sfrankle commented Mar 1, 2022

I just downloaded and I'm also having this issue. version 1.0.7

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

8 participants