Microsoft/vscode

Git - SSH error Permission denied in WSL2 + Remote Containers

Open

#103,679 opened on Jul 31, 2020

View on GitHub
 (13 comments) (16 reactions) (1 assignee)TypeScript (74,848 stars) (10,221 forks)batch import
buggithelp wanted

Description

Issue Type: Bug

When using a remote container within WSL2 that has ssh-agent (in this case using keychain) setup to cache credentials I can use git fine from my terminal.

However trying to use the Source Control tools with Git results in an error:

git@my-redacted-host.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

There is plenty of advice/documentation prior to WSL2 but with this particular combination I can't find any documentation.

VS Code version: Code - Insiders 1.48.0-insider (15ada625f20086007e2c4aa0d760234360cd648f, 2020-07-30T14:43:12.691Z) OS version: Windows_NT x64 10.0.19041 Remote OS version: Linux x64 4.19.104-microsoft-standard

Item Value
CPUs Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)
GPU Status 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: enabled_onprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled
Load (avg) undefined
Memory (System) 15.91GB (2.73GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote Dev Container: vscode-dev-aws
OS Linux x64 4.19.104-microsoft-standard
CPUs Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3407)
Memory (System) 7.77GB (0.21GB free)
VM 0%
Extension Author (truncated) Version
remote-containers ms- 0.128.0
remote-ssh-edit-nightly ms- 2020.7.38340
remote-ssh-explorer-nightly ms- 2019.8.31680
remote-ssh-nightly ms- 2020.7.38340
remote-wsl ms- 0.44.4
aws-toolkit-vscode ama 1.12.0
vscode-markdownlint Dav 0.36.2
gitlens eam 10.2.2
gitlab-workflow Git 3.1.0
aws-cli-configure mar 0.3.0
vsliveshare ms- 1.0.2478
vsliveshare-audio ms- 0.1.85
vsliveshare-pack ms- 0.4.0
resourcemonitor mut 1.0.7
trailing-spaces sha 0.3.1
gitflow vec 1.2.1
markdown-all-in-one yzh 3.2.0

Contributor guide