Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Feature request: Support non-https GitHub enterprise #158

Closed
enure opened this issue Aug 24, 2017 · 5 comments
Closed

Feature request: Support non-https GitHub enterprise #158

enure opened this issue Aug 24, 2017 · 5 comments

Comments

@enure
Copy link

enure commented Aug 24, 2017

Github enterprise may run on http rather than https. Currently https appears to be hard-coded into the extension. It would be nice if this was configurable, or if it read the protocol from the project's git config.

@KnisterPeter KnisterPeter changed the title Support non-https GitHub enterprise Feature request: Support non-https GitHub enterprise Aug 25, 2017
@KnisterPeter
Copy link
Owner

It should already be possible. When you setup the access token for your github instance you could provice the hostname like this: http://your-domain/.
This will allow to use http as protocol.

@enure
Copy link
Author

enure commented Aug 26, 2017

I re-installed the extension and tried it again, and it's still not working.

The error, with my info redacted is:

request to https://[hostname]/api/v3/repos/[user-name]/[repository-name]/issues?sort=updated&direction=desc failed, reason: connect ECONNREFUSED [ip-address]:443

I'll see if I can figure out how to debug this extension locally.

This is when running the "Github: Browse open issue..." command.

@enure
Copy link
Author

enure commented Aug 28, 2017

For me, the bug is here:
https://github.com/KnisterPeter/vscode-github/blob/master/src/github-manager.ts#L50

When debugging locally, the hostname does not include the protocol, therefore hostname.startsWith('http') is always false.

The hostname variable is set on L46 (https://github.com/KnisterPeter/vscode-github/blob/master/src/github-manager.ts#L46), where it calls git.getGitHubHostname, which eventually calls git.getGitHubOwnerAndRepositoryFromHttpUrl, which returns the owner name and the hostname (without the protocol).

@KnisterPeter
Copy link
Owner

Thanks for debugging. I'll look into it for a fix.

Sent from my Google Pixel using FastHub

@KnisterPeter KnisterPeter reopened this Sep 11, 2017
KnisterPeter added a commit that referenced this issue Sep 12, 2017
Github Enterprise might be available on non-ssl connections

Closes #158
@KnisterPeter
Copy link
Owner

Will be released with 0.20.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants