1

I posted about this yesterday, but I've made a bit of headway. Turns out my IP address got blacklisted by the server. I'm still having some trouble though.

When I run "ssh -vvv git@gitlab.cs.myschool.edu", I get back this:

debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /.ssh/id_rsa
debug3: no such identity: /.ssh/id_rsa: No such file or directory
debug1: Trying private key: /.ssh/id_dsa
debug3: no such identity: /.ssh/id_dsa: No such file or directory
debug1: Trying private key: /.ssh/id_ecdsa
debug3: no such identity: /.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /.ssh/id_ed25519
debug3: no such identity: /.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive

(That's just a snippet that seems to be the root of the problem. The entire log is here: http://pastebin.com/Ryx4NFwW )

It's saying that /.ssh/id_rsa doesn't exist, but:

PS C:\Users\Jonathan\.ssh> ls


    Directory: C:\Users\Jonathan\.ssh


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---         9/10/2014  10:58 PM         67 config
-a---          7/5/2014  10:39 PM       1675 github_rsa
-a---          7/5/2014  10:39 PM        402 github_rsa.pub
-a---         9/10/2014  11:14 PM       1679 id_rsa
-a---         9/10/2014  11:14 PM        397 id_rsa.pub
-a---         9/10/2014  10:17 PM        193 known_hosts

Anyone have any ideas?

Edit: I should note that if I do "ssh -vvv -i C:\Users\Jonathan.ssh\id_rsa git@gitlab.cs.myschool.edu" it seems to work correctly.

Edit2: I just noticed something even stranger. In the full log I posted up above, there's this section:

debug3: load_hostkeys: loading entries for host "gitlab.cs.myschool.edu" from file "/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug3: load_hostkeys: loading entries for host "137.30.120.92" from file "/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug1: Host 'gitlab.cs.uno.edu' is known and matches the ECDSA host key.
debug1: Found key in /.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct

It can find and read from the known_hosts file. Which is in the same directory as my id_rsa key file. This is really confusing and not making any sense :(

Edit 3: I also tried making a config file at C:\Users\Jonathan.ssh\config (there wasn't one there before) and put this in it:

Host gitlab.cs.uno.edu
    IdentityFile C:\Users\Jonathan\.ssh\id_rsa

Also tried changing the host to just uno.edu, but still no go. Keep getting access denied when I try to run git clone.

Keirathi
  • 397
  • 1
  • 5
  • 18
  • Windows is definitely Not My Thing, but why does ssh debug output point to `/.ssh/whatever` and not `C:/Users/Jonathan/.ssh/whatever`? – torek Sep 11 '14 at 04:21
  • I have no idea! That's part of what I'm trying to figure out. SSH seems to be looking in the wrong place and I don't know why. – Keirathi Sep 11 '14 at 04:29
  • Could you please also show the content of ".ssh/config" file? – Landys Sep 11 '14 at 05:05
  • The config file seems fine. What is the terminal you use to access the server, `command prompt`, `putty`, `cygwin`, `git bash (actually mingw32)` or something else? Form the log, it seems `command prompt`. You may try to use `git bash`, which will look up private key in your configured folder. – Landys Sep 11 '14 at 05:59

1 Answers1

3

You need to make sure of your %HOME% environment variable value: since the openssh packaged with git will search for the ssh keys in %HOME%/.ssh/, that would explain the /.ssh/ that you see if %HOME% was empty.

The git-cmd.bat is supposed to set %HOME% properly.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • THANK YOU! I spent hours and hours trying to fix this problem. When I installed git using their installer, I installed it to my D: drive. Inside D:\git\ there is a .ssh folder, and it's definitely reading my key files from there. Git works successfully now! As an aside, I don't have a %HOME% environment variable, or a git-cmd.bat file. Going through and setting that up is probably the proper way to do it, but I'm just so happy it's working now that I'm not going to fool with it for now. Thank you again! – Keirathi Sep 11 '14 at 06:00