Before submitting
What happened?
DevPod forward SSH agent through different socket on each SSH session. But at least Zed and VSCodium with open-remote-ssh extension expect stable SSH agent socket. Because of that I'm unable to connect to SSH servers or authenticate against git forges from Zed or VSCodium.
Reference: loft-sh#1611
What did you expect to happen instead?
Be able to use SSH keys from ssh-agent inside DevPod in Zed and VSCodium.
Steps to reproduce
- Run
devpod up .
- Open terminal inside Zed or VS Codium
-
[user@cf394da3fe79 teloxide]$ git pull
sign_and_send_pubkey: signing failed for ED25519-SK "shdwchn10" from agent: agent refused operation
sign_and_send_pubkey: signing failed for ED25519-SK "shdwchn10" from agent: agent refused operation
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
$SSH_AUTH_SOCK is always stable. It doesn't change in freshly opened terminal from IDE.
$ echo $SSH_AUTH_SOCK
/tmp/auth-agent3542344653/listener.sock
devcontainer.json
{
"build": {
"dockerfile": "Containerfile"
},
"customizations": {
"vscode": {
"extensions": [
"eamodio.gitlens",
"rust-lang.rust-analyzer",
"serayuzgur.crates",
"tamasfe.even-better-toml",
"nefrob.vscode-just-syntax",
"Gruntfuggly.todo-tree"
]
}
},
// ↓ Required for SELinux enabled systems
"workspaceMount": "",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"runArgs": [
"--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z"
]
}
Error output / logs
How often does this happen?
Every time
Operating system
Linux
Linux distribution (if applicable)
Fedora Silverblue 43
Architecture
AMD64
Desktop app or CLI?
Both
DevPod version
v0.22.1
DevPod provider
Docker
Provider version
No response
Screenshots
No response
Anything else?
$SSH_AUTH_SOCK is always different between terminal sessions without IDE:
❯ ssh teloxide.devpod
[user@cf394da3fe79 teloxide]$ echo $SSH_AUTH_SOCK
/tmp/auth-agent2164616655/listener.sock
[user@cf394da3fe79 teloxide]$
logout
❯ ssh teloxide.devpod
[user@cf394da3fe79 teloxide]$ echo $SSH_AUTH_SOCK
/tmp/auth-agent4248411302/listener.sock
Workaround
- Open terminal and write
ssh <devpod_prj>.
- Get
$SSH_AUTH_SOCK value: echo $SSH_AUTH_SOCK. Don't close terminal or ssh-agent forwarding will stop!
- Set it inside Zed/VS Codium terminal:
[user@cf394da3fe79 teloxide]$ export SSH_AUTH_SOCK=/tmp/auth-agent3539020177/listener.sock
[user@cf394da3fe79 teloxide]$ git pull
Already up to date.
- This works for current IDE terminal though. It won't fix operations inside IDE, e.g.
git: pull command in the Zed itself will still fail.
Before submitting
What happened?
DevPod forward SSH agent through different socket on each SSH session. But at least Zed and VSCodium with open-remote-ssh extension expect stable SSH agent socket. Because of that I'm unable to connect to SSH servers or authenticate against git forges from Zed or VSCodium.
Reference: loft-sh#1611
What did you expect to happen instead?
Be able to use SSH keys from ssh-agent inside DevPod in Zed and VSCodium.
Steps to reproduce
devpod up .$SSH_AUTH_SOCKis always stable. It doesn't change in freshly opened terminal from IDE.devcontainer.json
{ "build": { "dockerfile": "Containerfile" }, "customizations": { "vscode": { "extensions": [ "eamodio.gitlens", "rust-lang.rust-analyzer", "serayuzgur.crates", "tamasfe.even-better-toml", "nefrob.vscode-just-syntax", "Gruntfuggly.todo-tree" ] } }, // ↓ Required for SELinux enabled systems "workspaceMount": "", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", "runArgs": [ "--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z" ] }Error output / logs
How often does this happen?
Every time
Operating system
Linux
Linux distribution (if applicable)
Fedora Silverblue 43
Architecture
AMD64
Desktop app or CLI?
Both
DevPod version
v0.22.1
DevPod provider
Docker
Provider version
No response
Screenshots
No response
Anything else?
$SSH_AUTH_SOCKis always different between terminal sessions without IDE:Workaround
ssh <devpod_prj>.$SSH_AUTH_SOCKvalue:echo $SSH_AUTH_SOCK. Don't close terminal or ssh-agent forwarding will stop!git: pullcommand in the Zed itself will still fail.