cli: accept a user name in preauthkeys create --user

Resolved through lookupUser like the users commands, so scripts skip the
users list round trip. Digit-only values stay IDs.
This commit is contained in:
Kristoffer Dalby
2026-09-28 13:34:46 +00:00
committed by Kristoffer Dalby
parent 715c5a4a1c
commit 62f89ca25d
6 changed files with 86 additions and 7 deletions
+2 -2
View File
@@ -133,14 +133,14 @@ headscale instance. By default, the key is valid for one hour and can only be us
=== "Native"
```shell
headscale preauthkeys create --user <USER_ID>
headscale preauthkeys create --user <USER>
```
=== "Container"
```shell
docker exec -it headscale \
headscale preauthkeys create --user <USER_ID>
headscale preauthkeys create --user <USER>
```
The command returns the preauthkey on success which is used to connect a node to the headscale instance via the