Skip to content

Trims trailing newline from agentk token

How to test it

Use this command to start your agentk, but replace the token for your own token

echo "<your-token-here>" > ~/token.txt
bazel run //cmd/agentk -- --kas-address=<your-kas-address> --token-file="~/token.txt"

See that it fails with:

{"level":"warn","time":"2022-07-05T22:19:26.913-0300","msg":"GetConfiguration.Recv failed","error":"rpc error: code = Internal desc = stream terminated by RST_STREAM with error code: PROTOCOL_ERROR"}
{"level":"error","time":"2022-07-05T22:19:26.915-0300","msg":"Error handling a connection","mod_name":"reverse_tunnel","error":"Send(descriptor): rpc error: code = Internal desc = stream terminated by RST_STREAM with error code: PROTOCOL_ERROR"}

Apply this branch's change and validate that agentk now starts without errors.

Closes #19 (closed)

Edited by João Alexandre Cunha

Merge request reports