The ssh:// code in the Fossil self-hosting repository is now reasonably
complete, I believe.  It now works correctly on unix and windows.  Please
try it out.  Once I get 4 or 5 "works for me!" replies, I'll do a new
release build.

Here is how I use ssh:// under windows.

(1) Get plink.exe.  Rename it to ssh.exe
(2) Run "ssh [email protected]" at least once to get past the remote host
accept key message
(3) fossil clone ssh://username:*[email protected]:22/path/to/repo.fossil
clone.fossil

Notice the password is specified in the URL as "*".  Whenever Fossil sees a
password that begins with "*" it will assume that password is a placeholder
and prompt for the real password on each connection attempt.  You can
specify the complete password in the URL, if you want, but that would mean
that your password appears in plain sight on your screen.

If you omit the password, then Fossil assumes that you are using public-key
authentication using "pageant" or the equivalent.  If you do not have a
public key set up, be sure to puts "*" as your password in the URL or else
Fossil will not know to prompt for the real password.

The previous two paragraphs apply for windows.  On unix, any password you
supply in the URL is ignored.  Unix will prompt if and only if a password is
needed, whether you supply a password or not.

If you are running your ssh server on a non-standard port, then you can
specify an alternative TCP port where the ":22" is shown in the example
above.  22 is the default can can be omitted.

If the name of the Fossil command on the remote is not "fossil", then add a
query parameter to specify the actual name.  For example:

     ssh://host.org/path/to/repo.fossil?fossil=/home/me/bin/fossil-ex

If your local SSH command is not named "ssh", then specify a new one using
"fossil setting ssh-command  'NEW-COMMAND'.  The default command on unix is
"ssh -e none -T".  The default command on windows is "ssh -T".  I will
entertain arguments for and against changing the default windows command to
"plink -T".

Known issues:  (1) When things go wrong, the error output is generally not
very helpful.  I'm not sure what can be done about this.  (2) Documentation
is missing.  (3) Comments in the code to explain how this is all implemented
could be much better.

Thanks for all the suggestions.  Please continue to provide feedback!

Note I have tested ssh:// for windows on the client side only (windows
client talking to a unix server.)  Can anyone suggest a reasonable sshd
implementation for windows so that I can test out windows acting as an ssh
server?


On Wed, Aug 25, 2010 at 4:25 PM, Richard Hipp <[email protected]> wrote:

> The latest version of Fossil (in the self-hosting Fossil repository - not
> the precompiled binaries which are a little too old) supports a new method
> of pushing, pulling, cloning, and syncing using SSH.  Examples:
>
>      fossil clone ssh://[email protected]/local/path/repo.fossilex1.fossil
>
>      fossil clone 
> ssh://[email protected]//full/path/name/repo.fossilex2.fossil
>
> Notice that with a single / between the hostname and the beginning of the
> repository path, the repository path is relative to the home directory of
> the user.  With two // characters, the pathname to the repository is an
> absolute pathname.
>
> This new feature currently only works on unix.  As part of the
> implementation, I needed a bidirectional popen() function.  (The standard
> library popen() only works in one direction.)  I implemented this for unix
> in the popen.c source file.  But I do not know how to do the same on
> windows.  If someone cares to contribute ideas on how to implement a
> bidirection popen() for windows, that will help me get the new ssh://
> functionality working on windows.
>
> On the other hand, no many windows machines that I have seen support ssh.
> So maybe the ssh:// method is not useful there.  What do you think, gentle
> readers?
>
>
> --
> D. Richard Hipp
> [email protected]
>



-- 
D. Richard Hipp
[email protected]
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to