You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
It crashes with the following error messages:
tsh version --debug
[KEYSTORE] ERRO the given private and public keys do not form a valid keypair client/keystore.go:310
[CLIENT] DEBU the given private and public keys do not form a valid keypair client/api.go:1056
Failed to fetch proxy version: the given private and public keys do not form a valid keypair
Teleport v10.2.2 git: go1.19.1
tsh logout --debug
ERRO [KEYSTORE] the given private and public keys do not form a valid keypair client/keystore.go:310
DEBU [CLIENT] the given private and public keys do not form a valid keypair client/api.go:1056
ERROR REPORT:
Original Error: *trace.CompareFailedError the given private and public keys do not form a valid keypair
Stack Trace:
/private/tmp/teleport-20220916-10028-11awu4w/teleport-10.2.2/api/utils/keys/privatekey.go:225 github.com/gravitational/teleport/api/utils/keys.ParseKeyPair
/private/tmp/teleport-20220916-10028-11awu4w/teleport-10.2.2/api/utils/keys/privatekey.go:209 github.com/gravitational/teleport/api/utils/keys.LoadKeyPair
/private/tmp/teleport-20220916-10028-11awu4w/teleport-10.2.2/lib/client/keystore.go:308 github.com/gravitational/teleport/lib/client.(*FSLocalKeyStore).GetKey
/private/tmp/teleport-20220916-10028-11awu4w/teleport-10.2.2/lib/client/api.go:945 github.com/gravitational/teleport/lib/client.ReadProfileStatus
/private/tmp/teleport-20220916-10028-11awu4w/teleport-10.2.2/lib/client/api.go:1054 github.com/gravitational/teleport/lib/client.Status
/private/tmp/teleport-20220916-10028-11awu4w/teleport-10.2.2/tool/tsh/tsh.go:1679 main.onLogout
/private/tmp/teleport-20220916-10028-11awu4w/teleport-10.2.2/tool/tsh/tsh.go:999 main.Run
/private/tmp/teleport-20220916-10028-11awu4w/teleport-10.2.2/tool/tsh/tsh.go:444 main.main
/opt/homebrew/Cellar/go/1.19.1/libexec/src/runtime/proc.go:250 runtime.main
/opt/homebrew/Cellar/go/1.19.1/libexec/src/runtime/asm_arm64.s:1172 runtime.goexit
User Message: the given private and public keys do not form a valid keypair
Bug details:
Teleport version 10.2.2
Recreation steps ???
Debug logs
Reseting the ~/.tsh folder fixes the issue. I tried to see the diff of a working ~/.tsh folder with the broken one and I cannot see anything obvious. The files do not seem to be heavily corrupted. It could be very bad luck with one bit corruption somewhere, but I think it's better to report the issue in case more people experience it.
I'm suspecting it is a race condition error. I start VSCode with my Kubernetes plugin, and teleport starts the teleport login flow in the browser 3 times in parallel. It works most of the time but perhaps the race condition happens when writing the public and private keys files.
The text was updated successfully, but these errors were encountered:
fungiboletus
changed the title
Unable to use tsh: the given private and public keys do not form a valid keypair
Potential race condition. Unable to use tsh: the given private and public keys do not form a valid keypair
Sep 20, 2022
This bug hits when you're using Lens, as it ends up launching one refresh per context programmatically. When there's a valid single sign-on session in the browser, they then complete in parallel as well.
pschisa
added
c-se
Internal Customer Reference
tsh
tsh - Teleport's command line tool for logging into nodes running Teleport.
labels
Apr 24, 2023
Expected behavior:
It should work.
Current behavior:
It crashes with the following error messages:
Bug details:
Reseting the
~/.tsh
folder fixes the issue. I tried to see the diff of a working~/.tsh
folder with the broken one and I cannot see anything obvious. The files do not seem to be heavily corrupted. It could be very bad luck with one bit corruption somewhere, but I think it's better to report the issue in case more people experience it.I'm suspecting it is a race condition error. I start VSCode with my Kubernetes plugin, and teleport starts the teleport login flow in the browser 3 times in parallel. It works most of the time but perhaps the race condition happens when writing the public and private keys files.
The text was updated successfully, but these errors were encountered: