VSCode dev container and SSH
I am trying to use my SSH keys, which are stored in 1Password, in a dev container launched within VSCode.
Here is my ~/.ssh/config
```
Gitlab
Host gitlab.com
HostName gitlab.com
User git
IdentityAgent ~/.1password/agent.sock
ForwardAgent yes
IdentityFile ~/.ssh/gitlab.com.pub
UserKnownHostsFile ~/.ssh/known_hosts_gitlab
IdentitiesOnly yes
A second key for GitLab for work projects.
Host gitlab.edgeovens.com
HostName gitlab.com
User git
IdentityAgent ~/.1password/agent.sock
ForwardAgent yes
IdentityFile ~/.ssh/gitlab.edgeovens.com.pub
UserKnownHostsFile ~/.ssh/known_hosts_gitlab_edgeovens
IdentitiesOnly yes
```
As you can see, I'm using the public key as the identity file according to https://developer.1password.com/docs/ssh/agent/advanced/#match-key-with-host
1Password is configured as my SSH agent in the Linux desktop app.
I am setting the SSH_AUTH_SOCK environment variable before launching VSCode. Once I demonstrate that this works with a dev container, I will put this in my .zshrc file.
sh
SSH_AUTH_SOCK="$HOME/.1password/agent.sock" code ~/sandboxes/serial-data-acquisition/
I am mapping my local .ssh directory into the dev container; so my config and public SSH key files are visible.
When I run the command ssh-add -l, I see my SSH keys listed, so it seems that the SSH_AUTH_SOCK is working.
256 SHA256:AVz... gitlab.edgeovens.com (ED25519)
256 SHA256:PsD... gitlab.com (ED25519)
However, when I try to perform a git action, I receive the following error:
```sh
$ git clone mailto:git@gitlab.com:smfelsher/dotfiles.git
Cloning into 'dotfiles'...
Load key "/home/node/.ssh/gitlab.com.pub": error in libcrypto
mailto:git@gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```
Using 1Password as my SSH agent outside of a dev container works, so I know my setup with the public keys is valid. For example, I can clone that same dotfiles repository on my local host without issue.
Is there an issue with 1Password as an SSH agent in a dev container with public keys? Has anyone else been successful with this type of configuration?
1Password Version: 8.10.33
Extension Version: Not Provided
OS Version: Linux Manjaro
Browser: Not Provided
