The sound distributed version control system

#521 Can't get a new repo going

Opened by joyously on August 21, 2021 Documentation
joyously on August 21, 2021

Pijul doesn’t help you get started. Can’t I try a local repo? It says I need a key.

pijul init
pijul add *
pijul record -m "import of source"

The message is only

Error: No identity configured yet. Please use `pijul key` to create one

pijul key generate gives

error: The following required arguments were not provided:
   `<LOGIN>` 

USAGE:
    pijul key generate [OPTIONS] `<LOGIN>`

For more information try --help

The specific help doesn’t help. It doesn’t say what a <LOGIN> is. (and it shows the standard flags that aren’t relevant)

USAGE:
    pijul key generate [OPTIONS] `<LOGIN>`

ARGS:
    `<LOGIN>`    

FLAGS:
    -h, --help       Print help information
    -V, --version    Print version information

OPTIONS:
        --email `<EMAIL>` 
joyously on August 21, 2021

I had to put backticks around the angle bracketed stuff or Nest stripped them out. Maybe it would be better to use other characters in the actual help text, so it’s not a forever battle with HTML tags.

zj on August 30, 2021

@joyously Pijul uses a private and public key for identities; and these are generated in your case as: $ pijul key generate joyously. That’s actually what the error message tries to tell you:

error: The following required arguments were not provided:
   `<LOGIN>` 
joyously on August 30, 2021

OK, so the init needs to prompt for that, or there should be a way to have a local repo without a key, or the help text needs to be more explicit (and matching) so that the user knows what’s going on.

Or all of the above. Everyone should not have to ask you what this means. It doesn’t even mention the Nest.

zj on August 30, 2021

Agreed it’s not super obvious. Keys are a relative new addition to Pijul, and thus lack some still in UX. I’ll take a look at this issue some time later and see what of your suggestions can be implemented.

About the mention of the Nest, I think Pijul should be hosting agnostic. If a company wants to someday host their server on pijul.company.tld mentioning the nest will be confusing.

spacefrogg on September 3, 2021

@joyously It is the same behaviour git shows when you never have used git. (Although, they have better error messages.) When you never have used git, it would prompt you on the first git commit that you haven’t specified an author name and e-mail address, yet. That’s what pijul tries to tell you.

You only need to make an identity with pijul key generate once. After that, pijul won’t complain again.

ivy on October 4, 2021

I don’t really understand what’s going on when I run pijul key. I have SSH public keys which I uploaded to Nest. Are those related at all? I couldn’t find any information in the manual about this command.

spacefrogg on October 4, 2021

The key, you create with pijul key, serves the same purpose as “Your Name <e-mail>” in git or other VCSs. It is there to identify you in your patches. The difference is, that the key is cryptographically verifiable, while anybody could create git commits with “Your Name <e-mail>”. The second feature (not implemented, yet) of it is, that your name (and e-mail address) are no longer tied to your submitted patches. You could later change the name and e-mail address that other users see, when they look at your patches.

SSH keys are purely for authorizing the transport of patches to/from the Nest. They are not part of the VCS.

pmeunier on December 7, 2021

This is mostly a documentation issue I think, please open a discussion on the manual repository.

(I’m trying to close as many discussions as possible to try and move to beta).

pmeunier closed this discussion on December 7, 2021
joyously on December 7, 2021

If the code didn’t change, it’s not a documentation problem. This needs a code fix, so that the user understands how to continue. In my opinion, `the init command should indicate that the user needs to be identified if they aren’t yet. Remove the reference to LOGIN and make it understandable.

(side note: this edit box is doing weird things when I try to use back ticks)

joyously reopened this discussion on December 7, 2021
pmeunier added tag Documentation on December 8, 2021
finegeometer on January 11, 2022

I agree that this needs a fix. When I tried Pijul for the first time, I didn’t understand what <LOGIN> meant. I resorted to reading the code. Since commands::key::Key::run stores <LOGIN> in commands::Identity.login, and commands::protocol::output_id stores config.author.name in commands::Identity.login, I concluded that <LOGIN> refers to the screen name the user wishes to use.

This needs better docs.

ammkrn added a change on January 21, 2022
OKE6SXPP34GKAXKZTWLNHRJRQQN32T3SQCSOWWC3GTV425ZF5Q6QC
ammkrn on January 21, 2022

@finegeometer

I agree that login should be changed; for now I’ve added a key section to the manual and added to the documentation and feedback for the pijul key command.