Hub: How to use hub with custom http URL without SSL

Created on 12 Feb 2017  路  14Comments  路  Source: github/hub

more-info-needed

Most helpful comment

That is exactly my problem. ^

All 14 comments

What exactly is the problem you're running into? What's its current behavior?

It's worth noting that the normal GitHub API can only be accessed over HTTPS.

hi there, I _think_ I have a similar 'issue'. We are running GitHub enterprise internally, and it is running on http:// (so, no SSL). I have configured hub to use our GitHub hostname (using git config's hub.host setting) but I guess hub is hardcoded to use https:// here.

I know that HTTPS is a way to go, but for GitHub Enterprise installations, when they sometimes are on isolated networks (like in our case), there is no need for HTTPS. It would be good to have an option here, IMHO

That is exactly my problem. ^

Right now, you have to configure this manually within the ~/.config/hub file. Find the existing config for your GHE host and add the protocol line:

example.com:
- user: mislav
  oauth_token: REDACTED
  protocol: http

@mislav hmm, I thing it should be in ~/.config/hub, not ~/.hub/config :)

@mislav I can confirm that does not work.
It tries to access https URL instead. Can this be reopened?

@Swoorup What exactly did you try? (Please show ~/.config/hub, which sensitive data redacted.) What command did you run next? What happened instead?

This feature was around since hub 2.2.0. It's a bit of a hassle, but it always worked. 馃

I can confirm that it works.

github:
- user: swoorup
  oauth_token: REDACTED
  protocol: http

I ran the hub issue command on the repository whose URL is in format of git://. It then asked me, for my username and password. After entering it, it would take quite a while and show me errors. I could see it tried to access a https site instead.

In the first line of what you pasted there is github:. Instead of that, it should be the exact name of your host where GHE is installed, in the same way it appears in the git://HOSTNAME/... url for your git remote. Can you double-check that it matches?

Its an internal github :) without the [dot] com

Ah, I see. Which hub version do you have? What do you see when you use HUB_VERBOSE=1 hub issue in that repo? (Again, try to mask out sensitive data!)

@Swoorup Did you ever manage to get this working?

Closing due to lack of info

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dsifford picture dsifford  路  4Comments

jfritzbarnes picture jfritzbarnes  路  3Comments

le0nik picture le0nik  路  4Comments

eromoe picture eromoe  路  4Comments

kentcdodds picture kentcdodds  路  4Comments