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.