I remove accenditally my user certificat

Hi,

I accidentally remove my user certificat … from cmdline :person_facepalming:

sudo incus config trust rm xxxxxxxxx

I’m still get access to .config/incus … with client.key and client.crt.
Import via (probably a wrong action).

sudo incus config trust add-certificate ./client.crt

Cerficat is imported on trust store … but cannot use my user to create/list instance.

~/.config/incus  sudo incus config trust list
+--------------+--------+-------------+--------------+----------------------+
|     NOM      |  TYPE  | DESCRIPTION |  EMPREINTE   |  DATE D'EXPIRATION   |
+--------------+--------+-------------+--------------+----------------------+
| client.crt   | client |             | 7c3e1b312797 | 2034/11/07 17:11 EST |
+--------------+--------+-------------+--------------+----------------------+

 ~/.config/incus >  incus ls
Error: not authorized

How can I recreate my access without uninstalling all my running vm/containers.
note:
my user-1000 projects is stil present somewhere.
webui works with a new fresh certificat.

Tks.

W.

Can you show the output of sudo find /var/lib/incus/users/.

I suspect that to fix things, you may need to do something like sudo incus config trust add-certificate /var/lib/incus/users/1000/client.crt --restricted --projects user-1000

1 Like

Thank you.

It is functioning properly.
The certificate was located in /var/lib/incus/users/
Including client.crt in the config trust fix my error.

W.