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 authored and Kristoffer Dalby committed 2026-09-28 21:42:19 +02:00
1 parent 715c5a4a1c
commit 62f89ca25d
6 files changed
+86 -7

No files matched your search

+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