4

I'm having trouble setting up a Git server on a computer running Windows 2003 Server.

I installed CopSSH on the server, and can successfully connect to the server with SSH. Then, I installed MSysGit on the server (Just the compiled executables). Finally, I used ln -s in the CopSSH Bash shell to create links to the Git executables (from MSysGit's bin) in CopSSH's bin directory.

I can successfully connect to the server and use Git over SSH:

$ ssh git@<server>
git@<server>'s password:
Last login: Sun Dec   4 10:10:08 from <computer>

git@<server> ~
$ cd /cygdrive/c/gitRepos/

git@<server> /cygdrive/c/gitRepos/
$ mkdir test.git

git@<server> /cygdrive/c/gitRepos/
$ cd test.git

git@<server> /cygdrive/c/gitRepos/test.git
$ git init --bare
Initialized empty Git repository in C:/gitRepos/test.git/

git@<server> /cygdrive/c/gitRepos/test.git
$ exit
logout
Connection to <server> closed

But, when I try to clone from the server, it doesn't work:

$ git clone ssh://git@<server>:22/cygdrive/c/gitRepos/test.git
Cloning into test...
git@<server>'s password:
fatal: The remote end hung up unexpectedly

How can I get this to work?

ThatOtherPerson
  • 834
  • 6
  • 18

1 Answers1

1

Please take a look on this answer. Maybe you have the same issue?

Community
  • 1
  • 1
shytikov
  • 9,155
  • 8
  • 56
  • 103
  • No, both Git and CopSSH are using their versions of Bash - as I said, I can log in with SSH, and Git works fine. It's just when I try to run `git clone` that it doesn't work. – ThatOtherPerson Dec 05 '11 at 13:23
  • So maybe you have your SSH keys stored in two separate folders? And file cloning git tries to access wrong key pair? – shytikov Dec 05 '11 at 13:44
  • Actually, I'm not using SSH keys - just passwords. – ThatOtherPerson Dec 05 '11 at 13:46
  • Why do you need CopSSH client? If you installed `msysgit` it already has an ssh executable, so you can try to establish ssh session from `msysgit` bash and debug the ssh command output and find out the reason. I believe you will see, that git's ssh missing something important. – shytikov Dec 05 '11 at 15:05
  • I'm not using a CopSSH client - it's a server – ThatOtherPerson Dec 05 '11 at 15:11
  • Are you able to clone any `github` repository with your `msysgit` installation? – shytikov Dec 05 '11 at 15:44
  • One more question, if you're using CopSSH server, are you able to review it's log file? Maybe something in there? – shytikov Dec 05 '11 at 16:17
  • First, thanks for all the suggestions. Second, msysgit is working fine. Third, I can't currently access the server. I'll be able to check tomorrow. – ThatOtherPerson Dec 05 '11 at 16:39