Zhenzhong Xu
Zhenzhong Xu
CCoder.com
Created by Zhenzhong Xu on 12/14/2024 in #help
Coder created workspace (from K8s Devcontainer template) does not seem to inject proper SSH key
I found this doc, and it solved my problem. Please feel free to ignore the thread.
8 replies
CCoder.com
Created by Zhenzhong Xu on 12/14/2024 in #help
Coder created workspace (from K8s Devcontainer template) does not seem to inject proper SSH key
Seems like the coder agent (inside workspace) returns error on coder gitssh command, is this a bug?
coder@coder-7f668cfd-1bd6-4ee7-92e7-3416ef8b376e-6746758f4d-hzsxs:/workspaces$ /tmp/coder.vuXpAJ/coder gitssh --
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] [-b bind_address]
[-c cipher_spec] [-D [bind_address:]port] [-E log_file]
[-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file]
[-J destination] [-L address] [-l login_name] [-m mac_spec]
[-O ctl_cmd] [-o option] [-P tag] [-p port] [-R address]
[-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]
destination [command [argument ...]]
ssh [-Q query_option]

Coder authenticates with git using the public
key below. All clones with SSH are authenticated automatically 🪄.

ssh-ed25519 AAAA_[REDACTED]_

Add to GitHub and GitLab:
https://github.com/settings/ssh/new

https://gitlab.com/-/profile/keys


Encountered an error running "coder gitssh", see "coder gitssh --help" for more information

coder@coder-7f668cfd-1bd6-4ee7-92e7-3416ef8b376e-6746758f4d-hzsxs:/tmp$ coder gitssh [email protected]
PTY allocation request failed on channel 0
Hi zhenzhongxu! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
Encountered an error running "coder gitssh", see "coder gitssh --help" for more information
error: run ssh command: exit status 1
error: exit status 255
coder@coder-7f668cfd-1bd6-4ee7-92e7-3416ef8b376e-6746758f4d-hzsxs:/workspaces$ /tmp/coder.vuXpAJ/coder gitssh --
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] [-b bind_address]
[-c cipher_spec] [-D [bind_address:]port] [-E log_file]
[-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file]
[-J destination] [-L address] [-l login_name] [-m mac_spec]
[-O ctl_cmd] [-o option] [-P tag] [-p port] [-R address]
[-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]
destination [command [argument ...]]
ssh [-Q query_option]

Coder authenticates with git using the public
key below. All clones with SSH are authenticated automatically 🪄.

ssh-ed25519 AAAA_[REDACTED]_

Add to GitHub and GitLab:
https://github.com/settings/ssh/new

https://gitlab.com/-/profile/keys


Encountered an error running "coder gitssh", see "coder gitssh --help" for more information

coder@coder-7f668cfd-1bd6-4ee7-92e7-3416ef8b376e-6746758f4d-hzsxs:/tmp$ coder gitssh [email protected]
PTY allocation request failed on channel 0
Hi zhenzhongxu! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
Encountered an error running "coder gitssh", see "coder gitssh --help" for more information
error: run ssh command: exit status 1
error: exit status 255
8 replies
CCoder.com
Created by Zhenzhong Xu on 12/14/2024 in #help
Coder created workspace (from K8s Devcontainer template) does not seem to inject proper SSH key
8 replies
CCoder.com
Created by Zhenzhong Xu on 12/14/2024 in #help
Coder created workspace (from K8s Devcontainer template) does not seem to inject proper SSH key
Curious question, is the Coder agent running in the workspace pod actually passes SSH keys as mentioned here. If so, what's the mechanism? Attaching some logs below.
8 replies