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
Copy file name to clipboardExpand all lines: content/articles/containers/devcontainers.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,3 +112,31 @@ RUN apk add --no-cache git-lfs
112
112
113
113
EXPOSE 1313
114
114
```
115
+
116
+
## SSH Troubleshooting
117
+
118
+
Normally, VSCode *automatically* forwards the host's ssh-agent into the DevContainer. Here's how this normally works and that can give you a hint at where the problem is.
119
+
120
+
To see, if ssh works inside the devcontainer (i.e. the ssh-agent from the host is correctly routed to the container), execute:
If this variable is empty, search the contents of the container log (F1 > Dev Containers: Show Container Log) for "SSH_AUTH_SOCK":
135
+
136
+
```
137
+
[16730 ms] Start: Launching Dev Containers helper.
138
+
[16730 ms] ssh-agent: SSH_AUTH_SOCK not set on local host.
139
+
[16732 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-2d206968-2061-406b-8a9f-a4a5349dc649.sock) forwarded to local host (\\.\pipe\openssh-ssh-agent).
140
+
```
141
+
142
+
If this doesn't work and you are on Windows, it *may* help to manually set the `SSH_AUTH_SOCK` environment variable to `\\.\pipe\openssh-ssh-agent` ([source](https://github.com/microsoft/vscode-remote-release/issues/11043#issuecomment-3005677524)).
0 commit comments