devcontainers / images

Repository for pre-built dev container images published under mcr.microsoft.com/devcontainers
https://containers.dev
MIT License
1.23k stars 452 forks source link

Support Python 1.0.0: SSH keys not passed into container #650

Closed wstrausser closed 12 months ago

wstrausser commented 1 year ago

My organization uses our own dev containers for data analysis which have been using the python:3.11 image as a base. However, after the recent update, it appears that SSH keys are no longer being passed into the container, causing problems working with remotes in Git. I have tested reverting to the python:0.204.9-3.11 version and SSH works fine in this one, but breaks in the regular python:3.11 release.

samruddhikhandale commented 1 year ago

Hi 👋

However, after the recent update, it appears that SSH keys are no longer being passed into the container, causing problems working with remotes in Git.

Are you mounting ssh keys from your local ~/.ssh folder? Is that not working for you? Else, I am curious to see how SSH keys are passed, I don't think the python image mounts that 🤔

@wstrausser can you help provide repro steps & sample dev container for the mentioned issue?

I have tested reverting to the python:0.204.9-3.11 version and SSH works fine in this one, but breaks in the regular python:3.11 release.

Another pointer, python:3.11 now points to the debian 12 - bookworm distribution, and python:0.204.9-3.11 points to the debian 11 - bullseye. I wonder if the distribution switch could cause this issue. We have seen many python:bookworm issues reported in https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#python3-pep-668

@wstrausser can you test if python:3.11-bullseye works for you?

dpprdan commented 1 year ago

Are you mounting ssh keys from your local ~/.ssh folder?

Please just ignore if this isn't helpful, but I assume that @wstrausser is relying on the vscode devcontainer extension feature to "automatically forward your local SSH agent if one is running"?

doerfli commented 1 year ago

We are experiencing the same issue (access to the ssh-agent for the keys does not work properly) on the javascript-node and python based on bookworm. Using the bullseye version works. And it only appears on windows 10 hosts, macos and github codespaces works fine.

wstrausser commented 12 months ago

@samruddhikhandale Sorry for the delayed response on this ticket. Just tried switching to the latest bullseye version and this fixed the issue. Thank you!