Fossil User Forum

uv sync and ssh
Login

uv sync and ssh

uv sync and ssh

(1) By jvdh (veedeehjay) on 2021-07-22 19:45:56 [source]

tried to find something in the archive but no luck: with very recent fossil (trunk from a couple days ago) on local machine (osx) and server (ubuntu linux) I still do not manage to get unversioned files syncing to the server via ssh protocol. what I did:

"fossil uv add some_file" on local machine

"fossil uv ls" on local machine - which echos "some_file"

"fossil uv sync" on local machine

login to server and have a look:

"fossil uv ls -R server_repo.fossil"

which does not list anything so I presume some_file has not reached the server repo

what am I misunderstanding or doing wrong?

thx/joerg

(2) By John Rouillard (rouilj) on 2021-07-22 22:10:31 in reply to 1 [link] [source]

You need Write Unversioned permission on the remote server IIRC.

See: Write Unversioned at https://fossil-scm.org/home/doc/trunk/www/caps/admin-v-setup.md. You dontt get it with setup or admin rights.

(3) By jvdh (veedeehjay) on 2021-07-23 08:59:18 in reply to 2 [link] [source]

thank you.

I have done that now. so capabilities on both sides (local, server) are "sy" (indeed, the "y" was missing on the server side so far) for the account doing the ssh connection (and unix user name equals fossil user name if that matters in this (ssh) case, but I don't think so(?)).

but no luck. same behaviour as w/o the "y" flag set on the server: issuing

fossil uv sync

locally connects to server, thinks a moment and then returns w/o any warning or error message (even w/o the "y") after having sent back and forth a few hundred bytes only.

maybe some added information: before my update to the current fossil version (as of a few days ago) I ran older versions 6-12 months old where I also tried the "uv sync". with those versions at least fossil told me "insufficient permissions on the server". this is no longer happening with the newer versions.

but, more importantly, setting the "y" flag makes no difference.

(4.1) By Warren Young (wyoung) on 2021-09-08 12:51:32 edited from 4.0 in reply to 1 [link] [source]

Are you sure this ever worked? I spent about an hour trying to bisect my way to a version that did UV-over-SSH but couldn't find one. I gave up after digging back to 2.11. I think I found versions where it partially worked, but I could be confused, since I never did find my way back to one of those versions.

As far as I know, UV sync is only tested over HTTP[S], and the special non-Setup "y" capability only applies to http[s] URLs. I've already found and fixed one discrepancy due to this, but it still doesn't work right despite this.

You should not have to explicitly set the sync user to "sy" when using an ssh:// URL with Fossil. That's what my recent commit fixes. What it doesn't fix is the actual sync.

There seems to be some involvement with the new SSH command handling, added just before 2.16 was released, but I think the real problem is down in src/xfer.c, perhaps another case where it isn't adding "y" capability automatically for ssh:// URL schemes.

Simple test case, server side:

./fossil init /tmp/x.fossil

…and client side:

./fossil clone ssh://my-other-machine//tmp/x.fossil /tmp/x.fossil
./fossil uv add -R /tmp/x.fossil src/add.c
./fossil sync -u -v -R /tmp/x.fossil

The test file src/add.c is just a random file from Fossil's own source tree, since the test case uses the pre-installed build of Fossil, just to be sure the problem is in tip-of-trunk.

The sync command gives no errors with the recent "sxy" patch, but it still doesn't actually sync the UV file, evidenced by this on the server side:

./fossil uv ls -R /tmp/x.fossil 

EDIT: Improved test case, and re-tested with tip-of-trunk as of [9834d4dc72].

(5) By jvdh (veedeehjay) on 2021-07-23 20:23:57 in reply to 4.0 [link] [source]

I have never used uv much over ssh in the past (but now I would have a real use case). I seem to recall that it did work about 1y (?) ago, but I would not confirm this under oath -- maybe that was via file:// ....

the mentioned change in behaviour (warning regarding insufficient permissions on server with fossil version from about 6 months ago vs. silently not working with current fossil) is definitely there.

in any case, I am glad you can confirm the problem (so problem is not sitting in front of my keyboard). a solution of the issue of course would be welcome, if possible!

thanks, joerg

(6) By Andy Bradford (andybradford) on 2021-09-08 13:42:37 in reply to 5 [link] [source]

> a solution of the issue of course would be welcome, if possible!

Looks like someone fixed it.  It works for me:

$ fossil clone -u ssh://localhost//tmp/uvsync.fossil?fossil=$FOSSILBIN clone.fossil
SQLITE_NOTICE(283): recovered 2 frames from WAL file /home/amb/.fossil-wal
amb@localhost's password: 
Round-trips: 3   Artifacts sent: 0  received: 7
Clone done, wire bytes sent: 940  received: 82298  ip: localhost
Rebuilding repository meta-data...
  100.0% complete...d  66.6% complete...
Extra delta compression... 
Vacuuming the database... 
project-id: ebe722f4137f5906c95678074acf2f580e798be6
server-id:  ae57efdaa006adcfb07194093d59a488175552ae
admin-user: amb (password is "RhjCGu6qYL")
$ fossil uv ls -R clone.fossil 
tmp/wwyamc.pdf

Andy

(7) By Richard Hipp (drh) on 2021-09-08 13:44:52 in reply to 1 [link] [source]

Please try again with the latest trunk check-in (or later). Report back success or failure, please.

(8) By jvdh (veedeehjay) on 2021-09-08 19:21:49 in reply to 7 [link] [source]

success :).

thanks a lot for fixing this.

joerg

(9) By jvdh (veedeehjay) on 2021-09-08 19:24:08 in reply to 6 [link] [source]

yes, "someone" (gues who) fixed it :): it does work now. which is good...