-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Problem setting up hub for Github Enterprise using SSH #1788
Comments
Thank you for the detailed report!
|
Thank you for a helpful reply! Based on your response, I have changed a few things and everything is working now. Then I was able to set up
Generally, I am quite happy with these extensions to |
Thank you for the detailed steps!
That sounds like your |
I set it in my profile, and I verify it from the CLI by running |
I found the issue. In
I used this as the basis for a proof-of-concept locally:
This code successfully prints the environment variable in
However, in Powershell:
I haven't found a fix or workaround yet but will look for one. |
Workaround: if I set this variable in Control Panel, everything works. So it appears to have something to do with the visibility of environment variables. Apparently |
Perhaps setting an environment variable like this
|
@sql-sith Is everything resolved here? Is there something we need to fix about our documentation, or can this be closed please? |
I am unable to figure out how to git
hub
working with GHE over SSH. I see that others have had similar issues, notably this one, but none of the articles I've read have had solutions that have worked for me. Of course, I didn't read all of them, so let me know if there is an answer already posted that I missed.Here's my relevant info:
git
is not aliased tohub
yet (since it's not fully working yet)I have set the following environment variables. I have tried this both in cmd.exe and in Powershell with similar results, so I will explicitly list both here in case it helps. I'm not sure where I got the idea that I needed both
GITHUB_HOST
andHUB_HOST
- need to look at the docs again, as I have a feeling thatHUB_HOST
is not needed as an environment variable.For cmd:
Similarly, for Powershell:
I created a personal access token and then created a new file named ~/.config/hub with these contents:
So here is the problem. Whenever I try to run any command that requires

hub
, I am prompted for a username (on our server, sohub
at least recognizes which server to talk to!). The username I type is not visible on the screen, and when I hit enter, I am shown a prompt for a password, but immediately shown an error message. I'm attaching a screenshot for you to see exactly what I mean.The way I authenticate to our GHE with normal
git
commands is via SSH using RSA keys. That's how I'd like to usehub
as well. Is this possible?Finally, partway through writing up this issue, I tried running
hub alias
, which told meError: couldn't detect shell type. Please specify your shell with "hub alias <shell"
. So I guessed and triedhub alias powershell
and got what might be a very useful error message stating that Powershell is not a supported shell but a number of *nix shells are supported. Is this true? I don't want to delete everything I typed up, in case you do support Powershell! But if I need to use bash, will that work in WSL?Thanks for reading all of this, and for any reply. Looks like a nice tool (my goal is simply to create pull requests from a CLI :) ).
UPDATE: my original post had my actual
oauth_token
in it so I have deleted that one and generated a new one.The text was updated successfully, but these errors were encountered: