harmy / boar

Automatically exported from code.google.com/p/boar
0 stars 0 forks source link

Make boar work over ssh with zero setup #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I like the idea of boar as a simple binary VCS but would like it to work over 
SSH as conveniently as rsync, git, svn etc, i.e. preferably without having to 
start any boar server process.

I saw that there is some (experimental?) RPC client/server code already. An 
alternative might be to

1) Ensure boar can be made to not print anything to stdout when running in 
server mode.
2) Implement the rpc over a pipe. Let `boar stdioserver` or something serve RPC 
over stdin/stdout instead of a socket.
3) Spawn ssh as a child process when working with an ssh:// url. For Windows we 
can probably bundle plink.exe from PuTTY.

I wonder if someone's already made python libraries for this sort of thing.

No promises, but I might try to hack something together for this after a couple 
of months.

Original issue reported on code.google.com by martin.p...@gmail.com on 15 Apr 2012 at 1:16

GoogleCodeExporter commented 9 years ago
Very good idea. And likely not too hard to implement either. The current 
experimental RPC works ok, but the protocol is messy and it lacks 
authentication (which would be alleviated nicely by ssh). It currently uses 
sockets, but it should not be too hard to modify it to use stdin/stdout instead.

The first protocol version was very clean and simple using pure jsonrpc. 
However, the performance was horrific for a number of reasons. The latest 
version is better, but is still slow when sending files upstream. 

Original comment by ekb...@gmail.com on 16 Apr 2012 at 3:09

GoogleCodeExporter commented 9 years ago
I have now successfully run some tests by using ssh as a transport mechanism. 
Works very well! It will be trivial to allow for other transporters besides 
ssh. I've thrown out the old socket code altogether, using stdin/stdout and an 
external transport program is much cleaner. If a speedy non-encrypted 
connection is desired, one can likely use netcat instead of ssh (starting the 
server with xinetd). I'm doing some experiments with that as well, looks good.

Original comment by ekb...@gmail.com on 30 Apr 2012 at 3:17

GoogleCodeExporter commented 9 years ago
As of changeset fafcd0f3b175 it is now possible to connect to a repository over 
ssh by using a special URL as repo path. The format is 
"boar+ssh://username@server.example.com/path/to/repository". The command 
requires that "boarserve.py" is in the default path on the server. Also, 
automatic authentication must be set up correctly. Support for alternative ssh 
commands, and plink.exe on windows, remains to be implemented.

This feature should be considered experimental until it is included in the next 
release. There may be cases of less-than-intuitive error messages when things 
go wrong, but otherwise it should be just as safe as using a local repository.

Original comment by ekb...@gmail.com on 20 May 2012 at 5:47