Fossil Forum

fossil login-group error
Login

fossil login-group error

(1) By mfashby on 2022-07-30 20:09:51 [source]

Hi!

I have several fossil repositories, and I'd like to synchronize users between them. Fossil's login-group feature looks like what I need. However, I'm unable to make a new login-group, my command is always rejected:

$ fossil login-group
Not currently a part of any login-group
$ fossil login-group join
unknown extra arguments to "login-group join"
$ fossil login-group join --name=main
unrecognized command-line option or missing argument: --name=main
$ fossil login-group join --name main
unknown extra arguments to "login-group join"
$ fossil login-group join name main
unknown extra arguments to "login-group join"
$ fossil login-group --name=main join
unknown command "--name=main" - should be "join" or "leave"
$ fossil version
This is fossil version 2.18 [84f25d7eb1] 2022-02-23 13:22:20 UTC

Can anyone tell me what I'm doing wrong?

(2.1) By Stephan Beal (stephan) on 2022-07-30 20:12:54 edited from 2.0 in reply to 1 [link] [source]

fossil login-group join --name=main

Fossil CLI flags never use '=' between the key and the value:

fossil login-group join --name main

Edit:

$ fossil login-group join --name main
unknown extra arguments to "login-group join"

Okay, that's either a bug or a doc error. i'll look into it.

(3) By Stephan Beal (stephan) on 2022-07-30 20:21:22 in reply to 2.1 [link] [source]

$ fossil login-group join --name main
unknown extra arguments to "login-group join"

That's a doc error. The help text should say:

fossil login-group join REPO ?--name NAME?

where REPO is a repository DB file containing the login group to join. When creating a new login group, --name X is required, otherwise it will join the group specified by REPO.

A doc fix will be checked in shortly.

(4.1) By mfashby on 2022-07-30 20:55:25 edited from 4.0 in reply to 3 [link] [source]

hey, thanks so much for the fast reply! I've tried the command as you suggest and still no joy:

$ fossil login-group my.fossil join --name main
use --repository or -R to specify the repository database

If I try with the --repository argument set as the help text suggests, still error

$ fossil login-group join --repository my.fossil --name main
unknown extra arguments to "login-group join"

(5) By mfashby on 2022-07-30 20:58:35 in reply to 4.1 [link] [source]

Ah I got it; in an open fossil repo:

$ fossil login-group join ../other.fossil --name main
Now part of login-group "main" with:
  My

it wasn't immediately obvious to me; you create a login group with a minimum of 2 repositories (I was thinking create the group in one repo, and join it from the others)

Thanks again for your help.

(6) By Stephan Beal (stephan) on 2022-07-30 21:27:27 in reply to 4.1 [link] [source]

$ fossil login-group my.fossil join --name main

The error there was the argument order. The subcommand "join" must come immediately after the command "login-group".

If I try with the --repository argument set as the help text suggests, still error

The error there was that the fossil version you have does not correctly recognize the -R/--repository flag for that case. That's now fixed in the trunk version, so that you can (with the current trunk) use either:

fossil login-group join MYREPO --name ...
# Or:
fossil login-group join -R MYREPO --name ...

Noting that the order of the subcommand argument(s) and flag(s) is irrelevant, so this also work:

fossil login-group join --name foo MYREPO

The order/placement of the command/subcommand names is (normally) significant, however. Mostly. For good measure, when using commands which have subcommand names, always enter the subcommand name immediately after the command name.