it would be great if hub could handle ssh key management, like the github desktop applications.
How exacly do you envision this?
you could run something like hub ssh-key
which could do the following:
~./ssh/id_rsa.pub
is_rsa.pub
to your account.you could run something like
hub ssh-key
which could do the following:
maybe something more like hub ssh-key [keyname]
with keyname defaulting to id_rsa
- generate an ssh key if there's no ~./ssh/id_rsa.pub
then look for ~./ssh/<keyname>.pub
- prompt for a username and password for github
- adds is_rsa.pub to your account.
adds <keyname>.pub
to your account
@CircleCode +1
Definite +1 - the company I work for only allows ssh pushes, so as nice as hub is - we can't use it in our environment.
@jswager I was initially using hub when all my repos were pushed to GitHub over ssh protocol. How are you not able to use hub exactly? You just need to set up an SSH key manually and upload the public key to your GitHub profile, just as you do with regular git (hub is not involved with this in any way)
I'm adding this feature now. I actually wrote a one-line shell script that does this, but this would be the correct place for that functionality to go. The interface will just prompt you for your GitHub username and password and then upload your key.
Any update?
I actually never did this, in part because I realized my use of SSH keys at the time was semi-crazy and in part because setting up the dev environment for hub
was hard because of the shell script tests. Before, I just generated a new key on every machine I provisioned. Now I just use agent forwarding and I'm down to only two keys :+1:
Mind sharing how you use ssh keys with hub? I have one already setup for git, but hub's still asking for a password.
Can you give an example terminal session? What commands are you running exactly? Git calls out to the regular SSH executable, and Hub is designed to be aliased as git
. Are you sure that the remote isn't just over https:// or something?
Do you only have one key on that machine? Is its public key one of these?
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7PIjYHbdNDtRe8dZlIQ4dvlrSJ8fQIYER6KIRnju077lkRz7CZ8gn2LFgWLm48D6+2z2FoA/DS/GtEGFL1JzUTmrVo7k9aCjYYiTJxBXCcqTCpRC6aeg6eHsO5/wD9j5shVWwOxATiO2mfG6o/eeEzrn//KU79v/juJ1W20DMurxS2/c79OU4weLy5Zjo6pU+hK2N0CEpPEKlhowgiL6HZvRJI3dKqCEqcVmqK2ldmr0t8O5NDoQOpIVyL4GLJV4pkXkSwXtFt7vrlqkshBVn7mgU4Ff71DglWTIS3+9DWR2BK0+QwJmJYw+45rOIWGrZ3o1IbPQ4P5Fh9BD8E2lf
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCGQY9LBlxbeG7wAobu7j+y6B1d2/mXr9ehnd5mueS9+zGugSaz8PVuFCCx/vkMA0AI9FXNN9/o3zSVHNevAGjoNaESD6sZcyJWM8MUbgZf3/YSzxr6LJBBLswCUSg01k2pANTdWNSbAFFsHGmdthY1ZRMIw6OTCOMXBuf1JoRXsw==
I figured it out, I had identity in my ssh config file typed as identitfy. Being curious, where did you get my public keys from?
Well I'd be darned, thanks
In the next release of hub, we will switch over from SSH URLs to HTTPS URLs by default. HTTPS authentication is a bit more user-friendly and seems to be preferred by GitHub users. Therefore, we won't build ssh key management to hub, as this is left as the responsibility of the user who needs ssh for authentication.
Most helpful comment
maybe something more like
hub ssh-key [keyname]
with keyname defaulting toid_rsa
then look for
~./ssh/<keyname>.pub
adds
<keyname>.pub
to your account