Using humioctl 0.28.2 I see that '\n' is not accepted as a line ending for the token file. For usability reasons it can be a nice idea.
Works
bin/humioctl -u darkstar.evilcorp.com groups list
...
End of line feature for \n
echo "********************************************" > ~/.humio/darkstar.token
bin/humioctl -u darkstar.evilcorp.com groups list
bin/humioctl --token-file ~/.humio/darkstar.token -u darkstar.evilcorp.com groups list
error listing groups: Post "https://darkstar.evilcorp.com/graphql": net/http: invalid header field value "Bearer ********************************************\n" for key Authorization
Fix by removing '\n' at the end of the token file
truncate -s -1 ~/.humio/darkstar.token
Works with truncated token file
bin/humioctl --token-file ~/.humio/darkstar.token -u darkstar.evilcorp.com groups list
...
Using humioctl 0.28.2 I see that '\n' is not accepted as a line ending for the token file. For usability reasons it can be a nice idea.
Works
End of line feature for \n
Fix by removing '\n' at the end of the token file
Works with truncated token file