found a solution after a bit of searching
http://github.com/guides/addressing-authentication-problems-with-ssh

 - S




On 29 May 2010 22:57, Sam Sherlock <sam.sherl...@gmail.com> wrote:

> Hi all,
>
> my global config is the other account - the sams account is my prviate one
> the repos with local config to connect to my private account use Other
> rather than sams
>
> I am using id_rsa as my default key for other account and sams_rsa for
> private account
>
> So why is git not using the ~.ssh/config file
>
> I am using msysgit windows - I generated key with ssh-keygen
>
> ~/.ssh/config (stuff in brackets I have tried but also did not work)
>
> Host *.github.com
> Hostname github.com
> User git
>
> Host sams.github.com
> IdentityFile ~/.ssh/sams_rsa
> (User sams)
>
> Host Other.github.com
> IdentityFile ~/.ssh/id_rsa
> (User Other)
>
> --
>
> $ ssh -vvv g...@sams.github.com
> OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
> debug1: Reading configuration data /g/Documents and
> Settings/Owner/.ssh/config
> debug1: Applying options for *.github.com
> debug1: Applying options for sams.github.com
>  debug2: ssh_connect: needpriv 0
> debug1: Connecting to github.com [207.97.227.239] port 22.
> debug1: Connection established.
> debug3: Not a RSA1 key file /g/Documents and Settings/Owner/.ssh/sams_rsa.
>  debug2: key_type_from_name: unknown key type '-----BEGIN'
> debug3: key_read: missing keytype
> debug2: key_type_from_name: unknown key type 'Proc-Type:'
> debug3: key_read: missing keytype
> debug2: key_type_from_name: unknown key type 'DEK-Info:'
> debug3: key_read: missing keytype
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug3: key_read: missing whitespace
> debug2: key_type_from_name: unknown key type '-----END'
> debug3: key_read: missing keytype
> debug1: identity file /g/Documents and Settings/Owner/.ssh/sams_rsa type 1
> debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1
> Debian-5github2
> debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH*
> debug1: Enabling compatibility mode for protocol 2.0
> debug1: Local version string SSH-2.0-OpenSSH_4.6
> debug2: fd 3 setting O_NONBLOCK
> debug1: SSH2_MSG_KEXINIT sent
> debug1: SSH2_MSG_KEXINIT received
> debug2: kex_parse_kexinit:
> diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sh
> 1
> debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
> debug2: kex_parse_kexinit:
> aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,
> rijndael-...@lysator.liu.se
> aes128-ctr,aes192-ctr,aes256-ctr
> debug2: kex_parse_kexinit:
> aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,
> rijndael-...@lysator.liu.se
> aes128-ctr,aes192-ctr,aes256-ctr
> debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,
> hmac-ripemd...@openssh.com,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,
> hmac-ripemd...@openssh.com,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: none,z...@openssh.com,zlib
> debug2: kex_parse_kexinit: none,z...@openssh.com,zlib
> debug2: kex_parse_kexinit:
> debug2: kex_parse_kexinit:
> debug2: kex_parse_kexinit: first_kex_follows 0
> debug2: kex_parse_kexinit: reserved 0
> debug2: kex_parse_kexinit:
> diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sh
> 1
> debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
> debug2: kex_parse_kexinit:
> aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,
> rijndael-...@lysator.liu.se
> aes128-ctr,aes192-ctr,aes256-ctr
> debug2: kex_parse_kexinit:
> aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,
> rijndael-...@lysator.liu.se
> aes128-ctr,aes192-ctr,aes256-ctr
> debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac...@openssh.com
> ,hmac-ripemd160,hmac-ripemd...@openssh.com,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac...@openssh.com
> ,hmac-ripemd160,hmac-ripemd...@openssh.com,hmac-sha1-96,hmac-md5-96
> debug2: kex_parse_kexinit: none,z...@openssh.com
> debug2: kex_parse_kexinit: none,z...@openssh.com
> debug2: kex_parse_kexinit:
> debug2: kex_parse_kexinit:
> debug2: kex_parse_kexinit: first_kex_follows 0
> debug2: kex_parse_kexinit: reserved 0
> debug2: mac_init: found hmac-md5
> debug1: kex: server->client aes128-cbc hmac-md5 none
> debug2: mac_init: found hmac-md5
> debug1: kex: client->server aes128-cbc hmac-md5 none
> debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
> debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
> debug2: dh_gen_key: priv key bits set: 125/256
> debug2: bits set: 540/1024
> debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
> debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
> debug3: check_host_in_hostfile: filename /g/Documents and
> Settings/Owner/.ssh/known_hosts
> debug3: check_host_in_hostfile: match line 2
> debug3: check_host_in_hostfile: filename /g/Documents and
> Settings/Owner/.ssh/known_hosts
> debug3: check_host_in_hostfile: match line 2
> debug1: Host 'github.com' is known and matches the RSA host key.
> debug1: Found key in /g/Documents and Settings/Owner/.ssh/known_hosts:2
> debug2: bits set: 507/1024
> debug1: ssh_rsa_verify: signature correct
> debug2: kex_derive_keys
> debug2: set_newkeys: mode 1
> debug1: SSH2_MSG_NEWKEYS sent
> debug1: expecting SSH2_MSG_NEWKEYS
> debug2: set_newkeys: mode 0
> debug1: SSH2_MSG_NEWKEYS received
> debug1: SSH2_MSG_SERVICE_REQUEST sent
> debug2: service_accept: ssh-userauth
> debug1: SSH2_MSG_SERVICE_ACCEPT received
> debug2: key: /g/Documents and Settings/Owner/.ssh/sams_rsa (0xa01a4d0)
> debug1: Authentications that can continue: publickey
> debug3: start over, passed a different list publickey
> debug3: preferred publickey,keyboard-interactive,password
> debug3: authmethod_lookup publickey
> debug3: remaining preferred: keyboard-interactive,password
> debug3: authmethod_is_enabled publickey
>  debug1: Next authentication method: publickey
> debug1: Offering public key: /g/Documents and Settings/Owner/.ssh/sams_rsa
> debug3: send_pubkey_test
> debug2: we sent a publickey packet, wait for reply
> debug1: Remote: Forced command: gerve sams
> debug1: Remote: Port forwarding disabled.
> debug1: Remote: X11 forwarding disabled.
> debug1: Remote: Agent forwarding disabled.
> debug1: Remote: Pty allocation disabled.
> debug1: Server accepts key: pkalg ssh-rsa blen 277
> debug2: input_userauth_pk_ok: fp
> 18:2c:03:39:1e:93:67:6b:b1:96:4b:fb:32:a0:d3:71
> debug3: sign_and_send_pubkey
> debug1: PEM_read_PrivateKey failed
> debug1: read PEM private key done: type <unknown>
> Enter passphrase for key '/g/Documents and Settings/Owner/.ssh/sams_rsa':
> debug1: read PEM private key done: type RSA
> debug1: Remote: Forced command: gerve sams
>  debug1: Remote: Port forwarding disabled.
> debug1: Remote: X11 forwarding disabled.
> debug1: Remote: Agent forwarding disabled.
> debug1: Remote: Pty allocation disabled.
> debug1: Authentication succeeded (publickey).
> debug1: channel 0: new [client-session]
> debug3: ssh_session2_open: channel_new: 0
> debug2: channel 0: send open
> debug1: Entering interactive session.
> debug2: callback start
> debug2: client_session2_setup: id 0
> debug2: channel 0: request pty-req confirm 0
> debug3: tty_make_modes: ospeed 38400
> debug3: tty_make_modes: ispeed 38400
> debug3: tty_make_modes: 1 3
> debug3: tty_make_modes: 2 28
> debug3: tty_make_modes: 3 8
> debug3: tty_make_modes: 4 21
> debug3: tty_make_modes: 5 4
> debug3: tty_make_modes: 6 0
> debug3: tty_make_modes: 7 0
> debug3: tty_make_modes: 8 17
> debug3: tty_make_modes: 9 19
> debug3: tty_make_modes: 10 26
> debug3: tty_make_modes: 12 18
> debug3: tty_make_modes: 13 23
> debug3: tty_make_modes: 14 22
> debug3: tty_make_modes: 18 15
> debug3: tty_make_modes: 30 0
> debug3: tty_make_modes: 31 0
> debug3: tty_make_modes: 32 0
> debug3: tty_make_modes: 33 0
> debug3: tty_make_modes: 34 0
> debug3: tty_make_modes: 35 0
> debug3: tty_make_modes: 36 1
> debug3: tty_make_modes: 37 0
> debug3: tty_make_modes: 38 1
> debug3: tty_make_modes: 39 0
> debug3: tty_make_modes: 40 0
> debug3: tty_make_modes: 41 0
> debug3: tty_make_modes: 50 1
> debug3: tty_make_modes: 51 1
> debug3: tty_make_modes: 53 1
> debug3: tty_make_modes: 54 0
> debug3: tty_make_modes: 55 0
> debug3: tty_make_modes: 56 0
> debug3: tty_make_modes: 57 0
> debug3: tty_make_modes: 58 0
> debug3: tty_make_modes: 59 1
> debug3: tty_make_modes: 60 0
> debug3: tty_make_modes: 61 0
> debug3: tty_make_modes: 70 1
> debug3: tty_make_modes: 71 0
> debug3: tty_make_modes: 72 1
> debug3: tty_make_modes: 73 0
> debug3: tty_make_modes: 74 0
> debug3: tty_make_modes: 75 0
> debug3: tty_make_modes: 90 1
> debug3: tty_make_modes: 91 1
> debug3: tty_make_modes: 92 0
> debug3: tty_make_modes: 93 0
> debug2: channel 0: request shell confirm 0
> debug2: fd 3 setting TCP_NODELAY
> debug2: callback done
> debug2: channel 0: open confirm rwindow 0 rmax 32768
> debug2: channel 0: rcvd adjust 2097152
> debug2: channel 0: rcvd ext data 91
> ERROR: Hi sams! You've successfully authenticated, but GitHub does not
> provide shell accessdebug2: channel 0: written 91 to efd 6
> debug2: channel 0: rcvd ext data 1
> debug2: channel 0: rcvd eof
> debug2: channel 0: output open -> drain
> debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
>  debug2: channel 0: rcvd close
> debug2: channel 0: close_read
> debug2: channel 0: input open -> closed
> debug3: channel 0: will not send data after close
> debug2: channel 0: obuf_empty delayed efd 6/(1)
>
> debug2: channel 0: written 1 to efd 6
> debug3: channel 0: will not send data after close
> debug2: channel 0: obuf empty
> debug2: channel 0: close_write
> debug2: channel 0: output drain -> closed
> debug2: channel 0: almost dead
> debug2: channel 0: gc: notify user
> debug2: channel 0: gc: user detached
> debug2: channel 0: send close
> debug2: channel 0: is dead
> debug2: channel 0: garbage collecting
> debug1: channel 0: free: client-session, nchannels 1
> debug3: channel 0: status: The following connections are open:
>   #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cfd -1)
>
> debug3: channel 0: close_fds r -1 w -1 e 6 c -1
> Connection to github.com closed.
> debug1: Transferred: stdin 0, stdout 0, stderr 34 bytes in 0.9 seconds
> debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 38.9
> debug1: Exit status 1
>
> $git config -l
>
> github.user=Other
> github.token=<OtherTOKEN>
> user.name=other
>  user.email=ot...@others.com
>
> ...
>
> user.name=Sam Sherlock
> user.email=<EMAIL>
> github.token=<TOKEN>
> github.user=sams
> remote.origin.url=...@github.com:sams/test.git
> remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
>
> the later set being the local config additions for private account repos
>
> grateful for pointers - thanks in advance
>
> - S
>
>
>
>
>
> On 1 December 2009 21:18, chris <olsen.ch...@gmail.com> wrote:
>
>> It is working now.  I believe the remote repo was added incorrectly.
>> After removing it and re-adding it I was able to push my commits.
>>
>> Thanks for the help Alan.  It helped me out knowing the issue wasn't
>> in the .ssh/config file.
>>
>>
>> On Dec 1, 12:05 pm, Alan Hawrylyshen <a...@polyphase.ca> wrote:
>> > Interestingly enough -- your output is encouraging.
>> >
>> > Hmm ok, it looks like you are on a Mac and you are likely on Snow
>> Leopard, based on the version of openssh you are running. (It matches mine).
>> >
>> > I'll annotate your message below:
>> >
>> > On 2009/12/01, at 10:09 , chris wrote:
>> >
>> > > Here is the output from my personal account.  It seems to being using
>> > > the config file ok, although it says "Not a RSA1 key file".  Am I
>> > > pointing to the right file?
>> >
>> > I have never noticed that before and my ssh does this too. HOWEVER, if
>> you look much further in the logs, you see that the key is used:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > >> ssh -vvv g...@chrisolsen.github.com
>> > > =====================================
>> > > OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009
>> > > debug1: Reading configuration data /Users/chris/.ssh/config
>> > > debug1: Applying options for *.github.com
>> > > debug1: Applying options for chrisolsen.github.com
>> > > debug1: Reading configuration data /etc/ssh_config
>> > > debug2: ssh_connect: needpriv 0
>> > > debug1: Connecting to github.com [207.97.227.239] port 22.
>> > > debug1: Connection established.
>> > > debug3: Not a RSA1 key file /Users/chris/.ssh/chrisolsen_rsa.
>> > > [snip]
>> > > debug2: key: /Users/chris/.ssh/chrisolsen_rsa (0x100125d30)
>> > > debug2: key: /Users/chris/.ssh/id_rsa (0x1001264b0)
>> > > debug1: Authentications that can continue: publickey
>> > > debug1: Next authentication method: publickey
>> > > debug1: Offering public key: /Users/chris/.ssh/chrisolsen_rsa
>> > > debug1: Server accepts key: pkalg ssh-rsa blen 277
>> > > ERROR: Hi chrisolsen! You've successfully authenticated, but GitHub
>> > > does not provide shell access
>> >
>> > So that worked.
>> > Let's look at the other one.
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > >> ssh -vvv g...@greenstem.github.com
>> > > =====================================
>> > > OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009
>> > > debug1: Reading configuration data /Users/chris/.ssh/config
>> > > debug1: Applying options for *.github.com
>> > > debug1: Applying options for greenstem.github.com
>> > > debug1: Reading configuration data /etc/ssh_config
>> > > debug1: identity file /Users/chris/.ssh/id_rsa type 1
>> > > debug1: Remote protocol version 2.0, remote software version
>> > > debug2: key: /Users/chris/.ssh/id_rsa (0x100125ca0)
>> > > debug2: key: /Users/chris/.ssh/github_chrisolsen (0x100126470)
>> > > debug1: Authentications that can continue: publickey
>> > > debug1: Offering public key: /Users/chris/.ssh/id_rsa
>> > > debug1: Server accepts key: pkalg ssh-rsa blen 277
>> > > ERROR: Hi greenstem! You've successfully authenticated, but GitHub
>> > > does not provide shell access
>> >
>> > So I'm tempted to say that things are working at this point. Can you
>> confirm this is the case with git?
>> > What does
>> >
>> >         git remote show origin
>> >
>> > output in the repositories where you have setup these origins?
>> >
>> > I'm tempted to say that your ssh configuration is fine at this point.
>> > Not 100% where to debug it next - I'm a relative git newbie; with tons
>> of ssh / network experience.
>> >
>> > Alan
>> >
>> > --
>> > Alan Hawrylyshen
>> > a l a n a t p o l y p h a s e d o t c a
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "Git for human beings" group.
>> To post to this group, send email to git-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> git-users+unsubscr...@googlegroups.com<git-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/git-users?hl=en.
>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to