Skip to content

Explain missing and unreadable client keys for new users - #317

Merged
tas50 merged 1 commit into
mainfrom
improve-client-key-error
Nov 27, 2026
Merged

tas50 merged 1 commit into
mainfrom
improve-client-key-error

Conversation

@tas50

@tas50 tas50 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

The missing-client-key error assumed the reader knew what a client key is and how the server uses it:

Error: can't find your client key at /home/me/.cinc/me.pem — it's set as client_key in /home/me/.cinc/credentials. Create the key file, or update client_key to point at the right path.

"Create the key file" isn't something a new user can do. The message now explains:

Error: can't find your client key at /home/me/.cinc/me.pem.

cinc signs every request it sends to your Cinc server with a private key file, called a client key. That's how the server at https://cinc.example.com knows it's really "me" talking to it. Your "default" profile in /home/me/.cinc/credentials says the key is at the path above (that's the client_key setting), but there's no file there.

The server only accepts the key that was made for "me", so another .pem file won't work. Here's how to fix it:
  - If you have the key file somewhere else, change client_key in /home/me/.cinc/credentials to its full path.
  - If you don't have the key, ask whoever runs your Cinc server to make a new one for "me" and send you the .pem file. Save it somewhere private, then point client_key at it.
  - If you're setting up cinc for the first time, run `cinc config create` and it'll walk you through it.

The unreadable-key error now gives the exact chmod 600 <path> command (plus a chown hint), or Properties > Security steps on Windows.

  • Neither message names a key-creation command: client_name can be a user or a client, and a new user usually lacks the rights to make one.
  • The binary name comes from progname, matching the missing-server-URL error.
  • Both messages drop the em dash.

Tests: the existing missing- and unreadable-key tests now assert the profile, server, client name, the explanation, and the fix commands.

The missing-key error assumed the reader already knew what a client
key is. Spell out that cinc signs every request with it, name the
profile, server and client it belongs to, say that only the key made
for that client works, and list concrete next steps. The unreadable-key
error now gives the exact chmod command (or Windows steps).

Signed-off-by: Tim Smith <tsmith84@proton.me>
@tas50
tas50 merged commit 966a2db into main Nov 27, 2026
6 checks passed
@tas50
tas50 deleted the improve-client-key-error branch November 27, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant