2

I have strange behavior using these stuff in Windows.

At first I've installed MinGW with MSYS. I added all necessary parts into %PATH%, having where ssh output as in MSYS istall directory. All compilers and unix-commands as ssh, ssh-keygen work just fine.

Then I donwloaded git for Windows (without MSYS), installed it using second option (to run git from command line). where git works fine, targeting at git install dir. Empty repos can be created, files can be added, local branches can be made.

Then I configured git as it said in official tutorial, setting keys in my home directory through windows command line, so on so forth.

And now - the juice. I can connect via ssh to github using windows command line. I can connect to github via ssh to github using git bash. In both cases it greets me telling about successful login. I cannot perform any push via command line neither via git bash - it rejects my public key in both cases.

What am I doing wrong?

UPD. Somehow it all started working. I have no idea, what happened. I just pressed random buttons and input random commands (just kidding). I am trying to reproduce this problem on virgin system to understand what gone wrong. But, that a pity for me, I suppose that problem was in misspell on one of git-configuration steps. =\

defance
  • 140
  • 1
  • 13
  • Maybe this is linked to the `HOME` environment variable value? As in http://stackoverflow.com/questions/3454774/fix-msysgit-portable-home-location/3455231#3455231 – VonC Jan 08 '12 at 18:51
  • Nope. git and msys are looking keys in my home-folder, just where they are. If it was not so, I could not perform `ssh ...` towards github. – defance Jan 08 '12 at 22:38

1 Answers1

2

Git on Windows without MSYS is currently not possible. Check for yourself. What you did was add the "cmd" directory from the msysgit installation to PATH, instead of the "bin" directory, which would break lots of Windows CMD commands.

msysgit is all there is, and it works well. Just understand it will use its own tools, and store the ssh keys in its own place (by default the .ssh directory in your Windows user dir).

rubenvb
  • 69,525
  • 30
  • 173
  • 306
  • you public keys would be found in ~/.ssh – Adam Dymitruk Jan 08 '12 at 19:57
  • Yep. I know. May be, I messed it up, but I've downloaded so-called preview version (don't know what it means), that is 13Mb, from the official site. And it looks like it contains everything needed in its bin directory (kind of "pre-installed-msys"). And in I did not add git's bin path to my `PATH` (but it is not needed, because `git.cmd` overrides my `PATH`, and from the second hand, my unix-commands are added to `PATH` as in mingw bin path). Just what I needed. – defance Jan 08 '12 at 22:33