devcontainers / templates

Repository for Dev Container Templates that are managed by Dev Container spec maintainers. See https://github.com/devcontainers/template-starter to create your own!
https://containers.dev/templates
MIT License
859 stars 226 forks source link

SSH key sharing works only for 0-20 #249

Closed Azel-ytof closed 3 months ago

Azel-ytof commented 3 months ago

Hi,

I've done all things to share my SSH key to access my gitlab repositories. But the problem is that I get the git permission denied error.

In fact, I have test these images :

I've got the problem with all of this except for the 0-20, which works perfectly. I don't understand why this happen, and I'm not an expert of devcontainers so I don't know where to search.

Have you an idea of where is the problem and is it resolvable ?

May you need more information ?

samruddhikhandale commented 3 months ago

Hi 👋

I've got the problem with all of this except for the 0-20, which works perfectly.

With a newer major version for the image, the only breaking change was update the default distro to bookworm.

@Azel-ytof Can you try if this image works? 👇

mcr.microsoft.com/devcontainers/typescript-node:20-bullseye

Also, here are a few things you could try:

Remember to replace id_rsa with the name of your SSH key if it's different. If you're still having issues after trying these steps, please provide more information about the error messages you're seeing and any relevant configuration files.

Azel-ytof commented 3 months ago

Hi @samruddhikhandale,

It works with the given image...

ls -la ~/.ssh : I only have known_hosts, no my id_ed25519 keys... But it is the same thing in working images (20-bullseye and 0-20), so I don't think it comes from there.

samruddhikhandale commented 3 months ago

Looks it's relevant to the bookworm distro, hence, it looks similar to https://github.com/devcontainers/images/issues/768

Let's us that issue for tracking, thanks!

samruddhikhandale commented 3 months ago

Closing as this looks like an upstream issue!

Might be worth looking at https://github.com/microsoft/vscode-remote-release/issues/7525#issuecomment-1354742843 and upgrading OpenSSH for Windows.

Ref: https://github.com/devcontainers/images/issues/768#issuecomment-2030047224