summaryrefslogtreecommitdiff
path: root/doc/bugs/rsync_on_windows_broken_by_upgrade.mdwn
blob: 929770ccc392408daa15ebbca6de6d3b7ca540c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
rsync on windows has been broken by the upgrade to a newer version of
cygwin. `rsync user@host:file file` opens the ssh connection, but hangs
up with a protocol error. Apparently it doesn't get even the protocol
version message from the server.

Problem doesn't seem to affect the bundled ssh, just rsync. --[[Joey]]

> Update: Apparently there are two ssh's! msysgit bundles one (did it used
> to in PATH?) and git-annex bundles one from cygwin. msysgit's ends up
> in Git/bin and git-annex's in Git/cmd.
> 
> Seems that cygwin's rsync cannot use git's ssh for whatever reason.
> 
> So the workaround is to
> delete Git/bin/ssh.exe and leave Git/cmd/ssh.exe. Then rsync works.
> However, this may screw up git's use of ssh or other stuff.
>
> Particularly, cygwin's ssh doesn't honor HOME anymore, instead using
> the getpwent home, which doesn't exist. 
> 
> Also, see
> [[webapp_fails_to_connect_to_ssh_repository___40__windows__41__]]
> which is the inverse of this bug perhaps, or at least seems related.
> 
> Using 2 ssh's that try to use config from different places seems like
> a losing propisition. Need to find an rsync that works with git's ssh.
> --[[Joey]]
> 
> > Update: The git bin/ directory is only in PATH when inside "git bash".
> > This bug only seems to affect using git-annex that way. The git bash
> > PATH has `bin` before `cmd`.
> > 
> > Also, git seems to work ok using the newer ssh from cygwin.
> > However, that ssh tries to write to a .ssh/known_hosts
> > in a cygwin location and so doesn't remember hosts.
> >
> > What a mess. You can install any version of Linux and get rsync, ssh,
> > git that all integrate and work together. Or you can use Windows and
> > enjoy the pain(TM) --[[Joey]] 

>>> Possible fixes:
>>> 
>>> * Roll the bundled ssh and rsync back to the older versions.
>>> 
>>>   **This works**. And, seems that the older version of ssh from cygwin
>>>   looks at HOME, rather than getpwent home which the newer
>>>   cygwin ssh does.
>>>  
>>> * Roll the bundled rsync back, drop ssh. Rely on msysgit's bundled ssh,
>>>   copying it into cmd so it's in PATH. Check: Does this combo work?
>>>
>>>   **This works**! rsync 3.0.9 works ok with msysgit's bundled ssh.
>>>   rsync 3.1.1 is the one that needs a newer ssh. **[[done]]**
>>>
>>>   Note that this means we're using an old version of rsync
>>>   from cygwin with libraries from a newer cygwin. That might prove
>>>   fragile as cygwin is upgraded.
>>>
>>> * Hope that msysgit gets updated to include a newer version of ssh
>>>   which works with the new rsync.
>>>
>>>   (Seems reasonable as a long-term plan, assuming that the 
>>>   new rsync's problem with ssh is that it needs a new one, and not some
>>>   special cygwin thing.)
>>>
>>> * Get rsync from somewhere else, perhaps msysgit. (Maybe also get ssh
>>>   from msysgit?)
>>> * Keep the new rsync from cygwin, and build ssh from source,
>>>   patching it to use HOME in preference to getpwent home.