Closed GoogleCodeExporter closed 9 years ago
I think I have it working by pointing the GUI at C:\temp\pjc\plink.bat
However it passes the path to git, it doesn't work with spaces in filenames.
So the
"unable to fork" is from trying to run something that doesn't exist.
Original comment by pcor...@gmail.com
on 11 Mar 2009 at 4:34
Does it work with git command line?
Original comment by lzn...@gmail.com
on 12 Mar 2009 at 2:42
> Does it work with git command line?
not exactly, but TortoiseGit fails in a different way than some of my cmdline
attempts.
Also, both cmdline and tortoisegit work fine when the path to the batch file doesn't
contain any spaces.
As I said (somewhere in the middle of my last message):
On the msys bash command line:
GIT_SSH='c:\Program Files\TortoiseGit\plink.bat' git push ... outputs:
'c:/Program' is not recognized as an internal or external command,
operable program or batch file.
But TortoiseGit just says:
fatal: unable to fork
So, no, batch files with spaces in their names don't work on the command line
either.
This is probably actually msys git's fault, since it doesn't seem to be possible to
quote it a path to a batch file properly. It's fine with an exe with spaces in
the
path, but maybe .bat is different if it's trying to run cmd.exe on it. If you
quote
the path to
I hate \ as a path separator _and_ as a quote character, but I think in bourne shell
quoting, \ isn't special inside single quotes.
further testing:
GIT_SSH="/c/temp/p c/git-plink.bat" git push ...
'c:/temp/p' is not recognized as an internal or external command,
operable program or batch file.
And if you use "\ " to quote the space inside the msys forward-slash path, you get
"unable to fork".
c:/temp/p
I think TortoiseGit is putting a non-working path into GIT_SSH, maybe by quoting
spaces or something. Probably msys git checks if the path is valid, and bails
if
not, and only after that does pass it to a shell which does quote-removal and
word-
splitting. So if you quote the path to survive a trip through the shell, it
won't be
a valid path when msys checks early in its fork/exec. (I actually don't know
how
msys emulates fork...) But if you don't quote the path, msys will word-split
it in
the process of exec()ing it.
BTW, I had to give up on git over ssh, because the remote machine always prints
"cannot chdir to home directory", because I don't have one. This noise
injection
breaks git clone/pull, even though push seems to be ok. I got it working over
SMB,
but I had to use file:// URLs to invoke the git-aware transport. msys git
crashes
with plain local file URLs. (I'll report that to them.)
Original comment by pcor...@gmail.com
on 12 Mar 2009 at 1:14
reported to msys git as:
http://code.google.com/p/msysgit/issues/detail?id=203
Original comment by pcor...@gmail.com
on 12 Mar 2009 at 1:26
Does this issue still exist at 0.7.2.0?
Original comment by lzn...@gmail.com
on 29 Jun 2009 at 8:15
Issue 103 has been merged into this issue.
Original comment by lzn...@gmail.com
on 30 Jun 2009 at 1:16
msysgit problem
Original comment by lzn...@gmail.com
on 4 Apr 2010 at 1:17
Original issue reported on code.google.com by
pcor...@gmail.com
on 11 Mar 2009 at 4:29