0

Requirements: Write my own ssh server that allows msysgit to communicate with a repo (pull, push, etc) using the ssh protocol and going though my ssh server. I'm running on Windows 7.

using git remote definition of:

git remote set-url origin "ssh://test@localhost:22/C/gittestserver"

does not work through my ssh server, but does work if I go through another ssh server such as copssh.

Using a remote of the following and also doing manual manipulation of the command on my ssh server works:

git remote set-url origin "ssh://test@localhost:22/C:\gittestserver"

I get the following command in my ssh server using the original remote url git-receive-pack '/C/gittestserver' which does not work.
To get the above to work, i have to manually remove the single quote from the beginning and end of the second parameter, and I also have to remove the / from the beginning of the second parameter. After doing this manual command manipulation I can get git to work successfully.

Is there a way to avoid doing this manual manipulation or do it the proper way so that I don't break potential future use cases? Somehow other ssh servers on windows don't have this problem (copssh).

please see this question ("Using Git with Apache sshd") for more information.

Community
  • 1
  • 1
Coder
  • 1,375
  • 2
  • 20
  • 45
  • [JGit](http://eclipse.org/jgit/) supports SSH access out of the box as long as your JDK does. Perhaps try that? – hd1 Dec 17 '12 at 01:17
  • Thanks, but i'm writing the server side. I want to use existing software to go across my server. I figure this should have something to do with the shell i configure for the server, but changing it seems to have no affect on the parsing. – Coder Dec 17 '12 at 11:36

0 Answers0