Fossil Forum

fossil login-group error
Login

fossil login-group error

fossil login-group error

(1) By mfashby on 2022-07-30 20:09:51 [link] [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.

(7) By Marcelo Huerta (richieadler) on 2022-08-25 16:27:41 in reply to 6 [source]

I have a situation with many repositories in the same directory. I have added 0.fossil and 1.fossil to the same login group "repos"

I want to add 2.fossil to the same login group, so I run

fossil login-group join 0.fossil -R 2.fossil

and I get

unexpected argument count for "login-group join"

What am I doing wrong?

(8) By Stephan Beal (stephan) on 2022-08-25 18:34:44 in reply to 7 [link] [source]

What am I doing wrong?

Insofar as i can tell, nothing: the argument handling for the login-group command does not reflect what the help text says it wants. For example:

// Helps says:

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

// But...

$ f new 0.f
$ f new 1.f
$ f login-group join 0.f --name grp
use --repository or -R to specify the repository database
$ f login-group join -R 0.f --name grp
The "other" repository is the same as this one.
$ f login-group join 1.f --name grp -R 0.f
unexpected argument count for "login-group join"

For the time being, other priorities keep me from digging through that and figuring out which is intended (what the help says or what the code does) and fixing the other one.

The workaround for the time being is to use the /setup_login_group page of each repo to manage the login group connections.

(9) By Martin Gagnon (mgagnon) on 2023-01-15 15:55:40 in reply to 8 [link] [source]

Following up for the issue with login-group join using -R REPO flag.

Fixed on trunk here .