[darcs-devel] [issue504] Problem with darcsdir distribution when
using SSH_PORT
Dennis Lambe
bugs at darcs.net
Wed Aug 1 16:10:30 PDT 2007
New submission from Dennis Lambe <dlambe at preferred-mfg.com>:
I am using the darcsdir-cygwin-1.0.9.tar.bz2 distribution of darcs
provided by zooko.com on Windows XP. I'm using the SSH_PORT environment
variable to connect to an SSH server that is running on a non-standard
port. Darcs calls ssh with the -p option to set the alternate port, but
since your ssh.exe is really PuTTY's plink.exe it's looking for -P
(capital 'p') instead and certain operations (push, at least) fail with
plink: unknown option "-p"
I've hacked around this problem on my installation by renaming ssh.exe
to realssh.exe and building ssh.exe from this C source:
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int i;
for (i = 0; i < argc; i++) {
if (argv[i][0] == '-' && argv[i][1] == 'p')
argv[i][1] = 'P';
}
execvp("realssh.exe", argv);
return 0;
}
This works for me, but it's not terribly elegant. Patching darcs on
win32 to supply PuTTY-style command line arguments is probably the
cleanest solution without dragging in a cygwin dependency (for the real
ssh.exe).
--
Dennis Lambe Jr.
Preferred Utilities
<dlambe at preferred-mfg.com>
"The key to performance is elegance, not battalions of special cases."
--Jon Bentley and Doug McIlroy
----------
messages: 1971
nosy: beschmi, dlambe, droundy, kowey, tommy
status: unread
title: Problem with darcsdir distribution when using SSH_PORT
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue504>
__________________________________
More information about the darcs-devel
mailing list