Thus said Matt Welland on Mon, 05 Aug 2013 16:11:00 -0700:

> Once I have my  ssh key entered I should be able  to do all operations
> (clone, sync, commit etc.) without entering my password but the remote
> fossil knows who I am.

Yes,  this should  be possible  by setting  the REMOTE_USER  environment
variable in  the SSH session.  It looks like for  some reason when  I do
that,  the  clone  operation  fails  because  it  isn't  inheriting  the
capabilities of the nobody/anonymous users and I have to explicitly give
the user the clone capability. This needs fixing.

I was  able to accomplish it  simply with the following  script using an
SSH key:

command="/home/amb/tmp/fossil.sh guest" ssh-rsa

#!/bin/sh
REMOTE_USER="$1"
set -- $SSH_ORIGINAL_COMMAND
while [ $# -gt 1 ]; do shift; done
export REMOTE_USER
exec /home/amb/bin/fossil http "$1"

Here's a clone:

$ fossil clone ssh://remote//tmp/test.fossil guest.fossil
ssh -e none -T remote fossil http /tmp/test.fossil
Round-trips: 4   Artifacts sent: 0  received: 113
Clone finished with 971 bytes sent, 16469915 bytes received
Rebuilding repository meta-data...
  100.0% complete...
project-id: 8b464ab2d3cfb91d3a8cad20977ea037940e2a79
admin-user: amb (password is "85ba82")

Any commits done using this SSH key will actually show up as having been
commited by guest (as per the SSH Force Command).

Thanks for asking. It looks like  there may be some additional work (I'm
not sure why setting REMOTE_USER didn't  pick up all the permissions for
the user).

Andy
--
TAI64 timestamp: 40000000520040ea
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to