Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
0.8.0
-
None
-
None
-
Windows 7, MsysGit 1.8.0
Description
I have two git repositories on windows 7, locally for now as a testing step. When I set my git remote url with the following:
git remote set-url origin "ssh://test@localhost:22/C/gittest"
it does not work though the sshd server using mina sshd. Git says:
fatal: ''/C/gittest'' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
however this same url works fine with an ssh server running on windows 7 using copssh.
The only way I was able to get this to work with mina sshd was to set the url as follows:
git remote set-url origin "ssh://test@localhost:22/C:\gittest"
However this was not enough, I also had to manually parse out the "/" at the beginning of the command and the extra single quotes at the beginning and end of the command in the sshserver. This parsing should not be necessary. Perhaps i'm doing something wrong, but playing with the shell type etc did not lead anywhere.
I use the following code for handling the commands which I found online in how to use sshd:
sshServer = SshServer.setUpDefaultServer();
...
CommandFactory myCommandFactory = new CommandFactory() {
@Override
public Command createCommand(String command)
};
sshServer.setCommandFactory(new ScpCommandFactory(myCommandFactory));
I should not have to do manual altering of the commands on the server side in this arbitrary way as this will likely not work for other ssh commands i send to the server.
Please try to fix this before the next version of sshd. It is very critical for my use cases. And thank you very much for making this library. I have been looking for something like this for a long time.
Attachments
Issue Links
- is related to
-
SSHD-241 Git/SSH command support
- Resolved