Skip to content

Commit 1a7d188

Browse files
blooopclaude
andcommitted
Mount entire .ssh directory for SSH agent forwarding
Mount the whole ~/.ssh directory instead of individual files to enable SSH agent forwarding without stale socket issues. The directory mount allows the agent socket to come and go without breaking the container. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6b1217c commit 1a7d188

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude",
3434
"XDG_CONFIG_HOME": "/home/vscode/.config",
3535
"XDG_CACHE_HOME": "/home/vscode/.cache",
36-
"XDG_DATA_HOME": "/home/vscode/.local/share"
36+
"XDG_DATA_HOME": "/home/vscode/.local/share",
37+
"SSH_AUTH_SOCK": "/home/vscode/.ssh/agent.sock"
3738
},
3839
"mounts": [
3940
"source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume",
40-
"source=${localEnv:HOME}/.ssh/known_hosts,target=/home/vscode/.ssh/known_hosts,type=bind,ro",
41-
"source=${localEnv:HOME}/.ssh/config,target=/home/vscode/.ssh/config,type=bind,ro",
41+
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind",
4242
"source=${localEnv:HOME}/.config/gh,target=/home/vscode/.config/gh,type=bind"
4343
],
4444
"postCreateCommand": "sudo chown vscode .pixi && pixi install"

0 commit comments

Comments
 (0)