unixbigot / gozer

An api client for the Zerotier One software-defined-network written in Go
GNU General Public License v3.0
15 stars 13 forks source link

Wrong key when reading from config file #4

Open step21 opened 5 years ago

step21 commented 5 years ago

Since a while, on new installs I get the following error when running as a user. Seemingly this is related to the config file, as it works when specifying the token on the command line. It might be due to the '\n' but I am not sure how to get rid of it, as it exists anyway, even when just passing the key string to a new file.

gozer: 00:58:39.873985 GozerLog.go:35: ERROR:  [HTTP request failed] Get https://my.zerotier.com/api/network: net/http: invalid header field value "Bearer somethingsomething\n" for key Authorization
gozer: 00:58:39.874718 GozerLog.go:35: ERROR:  [Network request failed] Get https://my.zerotier.com/api/network: net/http: invalid header field value "Bearer somethingsomething\n" for key Authorization
gozer: 00:58:39.874750 gozer.go:48: Get https://my.zerotier.com/api/network: net/http: invalid header field value "Bearer somethingsomething\n" for key Authorization