mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Improve error message when using a "K10" prefixed token (#4180)
* Add new error message with a K10 prefixed secret token Signed-off-by: dereknola <derek.nola@suse.com>
This commit is contained in:
parent
ac7a8d89c6
commit
feec44572d
@ -201,7 +201,7 @@ func readTokenFromFile(serverToken, certs, dataDir string) (string, error) {
|
||||
func normalizeToken(token string) (string, error) {
|
||||
_, password, ok := clientaccess.ParseUsernamePassword(token)
|
||||
if !ok {
|
||||
return password, errors.New("failed to normalize token")
|
||||
return password, errors.New("failed to normalize token; must be in format K10<CA-HASH>::<USERNAME>:<PASSWORD> or <PASSWORD>")
|
||||
}
|
||||
|
||||
return password, nil
|
||||
|
Loading…
Reference in New Issue
Block a user