Ticket Change Details
Not logged in
Overview

Artifact ID: 9a1118ccc0d4069b0e5541f15ae8c71df178dcd6
Ticket: 115e95ac11631d0f3f2cf2427f1a7212999b079e
ssh clone failing
User & Date: anonymous 2010-12-24 23:55:38
Changes

  1. Appended to comment:
    
    
    <hr /><i>anonymous claiming to be Joerg Sonnenberger added on 2010-12-24 23:55:38:</i><br />
    I think I found the root of this problem. fossil is using ssh -T to connect to the server. This inhibits the creation of a pty and therefore sh is started with a pipe for stdin/stdout/stderr. This in turn makes libc use buffering. The commands are sent to this shell and the following POST request is obtained by sh too (due to the buffering). As a result, the remote fossil is waiting in read for data that will never arrive.
    
    I think the best approach for this is to not do fancy things involving the shell, but switch to something like:
    
    <verbatim>
    ssh -e none -T <host> <fossil> ssh-sync <repo-path>
    </verbatim>
    
    ssh-sync differs from test-http by looping on stdin until it is closed. E.g. use ssh like the equivalent of keep-alive with HTTP.
    
    Advantage: much less chance for a shell to mock things up. It can be easily changed to make fossil an ssh subsystem, which might be a nice option for deployment on central servers, where normal users shouldn't have shell access.