From b6ae60cc44bd8218443c21da0473d9b193c8ca7d Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Fri, 26 Nov 2021 14:49:51 -0500 Subject: [PATCH] The `create-node` subcommand under `debug` needs a 64 character key. --- cmd/headscale/cli/debug.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/headscale/cli/debug.go b/cmd/headscale/cli/debug.go index 46bdb9e8..226ae5e7 100644 --- a/cmd/headscale/cli/debug.go +++ b/cmd/headscale/cli/debug.go @@ -77,6 +77,16 @@ var createNodeCmd = &cobra.Command{ return } + if len(machineKey) != 64 { + err = fmt.Errorf("key '%s' too short, must be 64 hexadecimal characters", machineKey) + ErrorOutput( + err, + fmt.Sprintf("Error: %s", err), + output, + ) + + return + } routes, err := cmd.Flags().GetStringSlice("route") if err != nil {