github-keygen icon indicating copy to clipboard operation
github-keygen copied to clipboard

`-I keyfile` option not working,

Open ChristopherA opened this issue 1 year ago • 1 comments

I've installed via brew install github-keygen.

I then rm ~/.ssh/config

My existing GitHub auth key path is ~/.ssh/auth_id_ed25519_christophera@github

Then I run github-keygen -i auth_id_ed25519_christophera@github and the result is

github-keygen: Unknown option: i
… (followed by help)
   -i key-file
        The key is created only if it doesn't already exists.

        If only a filename is given, it will be relative to ~/.ssh/, else if
        a relative path is given it will be relative to the current
        directory. Absolute paths are kept as is.

ChristopherA avatar Jan 25 '24 20:01 ChristopherA

This can be closed, as was because I didn't put the GitHub account name.

If there is a TODO, it is that the error "missing GitHub account name" should have been first ;-)

ChristopherA avatar Jan 25 '24 20:01 ChristopherA

Well, as the -i option is unknown, we can't check the rest of the command-line: is the following parameter a key-file or the username or another wrong option? So the "missing GitHub account name" proposal would be hard to implement: it could be at most heuristics.

I don't think that the mistake is common enough to be worth digging in the options parsing code to specially handle those mistakes.

But thank you anyway for reporting your (self-resolved) issue. Reports of usability issues are really helpful.

dolmen avatar Mar 31 '24 01:03 dolmen