How can I set up a git repository on windows, and then push to/pull from it on Mac OSX

Posted by Eric S. on Stack Overflow See other posts from Stack Overflow or by Eric S.
Published on 2010-05-20T05:39:23Z Indexed on 2010/05/20 6:20 UTC
Read the original article Hit count: 327

Filed under:
|
|

I'm trying to set up a Windows-based web server, but do the development work on Mac OSX. I installed freeSSHd and msysGit on the Windows server, and set up a repository where I want it. I also have git on my Mac and set up a repo there too. When I try to clone, pull from, or push to the windows repo via SSH, it gives me an error, "fatal: protocol error: bad line length character" It doesn't matter what I set the remote to in my client (Mac OSX) machine - I can point it to a folder that doesn't exist and it still gives me that error.

I also tried this on a Linux box I have sitting around and it works perfectly, so it's not my Mac.

I have a couple ideas:

  1. Maybe freeSSHd isn't behaving correctly (as suggested here) so I could get a different SSH server for Windows - perhaps OpenSSH

  2. Perhaps I'm typing the code that combines Mac and Windows file paths incorrectly. I tried:
    sudo git clone ssh://[email protected]/C:/Users/[my_username]/[remote_repo_name]/.git [destination]

    and

    sudo git clone ssh://[email protected]/C:\Users\[my_username]\[remote_repo_name]\.git [destination]

    I'm getting the same error with both of these.

Does anybody know what's going wrong? Better yet, is there anybody out there that has managed to do what I want to do (push to and pull from a windows repository via SSH)?

Thanks!

© Stack Overflow or respective owner

Related posts about git

Related posts about ssh