microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.61k stars 275 forks source link

Fail to clone private repo is container volume #9353

Open Zenthae opened 8 months ago

Zenthae commented 8 months ago

Type: Bug

VS Code fail to clone private GitHub repository in container volume. I don't see any error, it just stops. I tested with public containers from my account and the sample, everything is working fine. SSH key is fine too, I tested it and I can manually clone the repo with git clone git:github.com:Zenthae/gook.git

git ls-remote https://github.com/Zenthae/gook.git is not working though, as it's asking for HTTPS credentials, which are not allowed anymore with GitHub

[2023-12-28T22:57:21.694Z] Start: Run: wsl -d Docker -e wslpath -u C:\Program Files\Microsoft VS Code
[2023-12-28T22:57:21.694Z] Dev Containers 0.327.0 in VS Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2).
[2023-12-28T22:57:21.782Z] Stop (88 ms): Run: wsl -d Docker -e wslpath -u C:\Program Files\Microsoft VS Code
[2023-12-28T22:57:21.784Z] Start: Run: wsl -d Docker -e /bin/sh -c cd '/mnt/c/Program Files/Microsoft VS Code' && /bin/sh
[2023-12-28T22:57:21.786Z] Start: Run in host: id -un
[2023-12-28T22:57:21.843Z] root
[2023-12-28T22:57:21.843Z] 
[2023-12-28T22:57:21.843Z] Stop (57 ms): Run in host: id -un
[2023-12-28T22:57:21.844Z] Start: Run in host:  (command -v getent >/dev/null 2>&1 && getent passwd 'root' || grep -E '^root|^[^:]*:[^:]*:root:' /etc/passwd || true)
[2023-12-28T22:57:21.845Z] Stop (1 ms): Run in host:  (command -v getent >/dev/null 2>&1 && getent passwd 'root' || grep -E '^root|^[^:]*:[^:]*:root:' /etc/passwd || true)
[2023-12-28T22:57:21.845Z] Start: Run in host: echo ~
[2023-12-28T22:57:21.846Z] /root
[2023-12-28T22:57:21.846Z] 
[2023-12-28T22:57:21.846Z] Stop (1 ms): Run in host: echo ~
[2023-12-28T22:57:21.846Z] Start: Run in host: test -x '/root/.vscode-remote-containers/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2/node'
[2023-12-28T22:57:21.847Z] 
[2023-12-28T22:57:21.847Z] 
[2023-12-28T22:57:21.847Z] Stop (1 ms): Run in host: test -x '/root/.vscode-remote-containers/bin/0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2/node'
[2023-12-28T22:57:21.847Z] Start: Run in host: test -f '/root/.vscode-remote-containers/dist/vscode-remote-containers-server-0.327.0.js'
[2023-12-28T22:57:21.848Z] 
[2023-12-28T22:57:21.848Z] 
[2023-12-28T22:57:21.848Z] Stop (1 ms): Run in host: test -f '/root/.vscode-remote-containers/dist/vscode-remote-containers-server-0.327.0.js'
[2023-12-28T22:57:21.849Z] userEnvProbe: loginInteractiveShell (default)
[2023-12-28T22:57:21.849Z] userEnvProbe: not found in cache
[2023-12-28T22:57:21.849Z] userEnvProbe shell: /bin/bash
[2023-12-28T22:57:21.889Z] userEnvProbe PATHs:
Probe:     'redacted'
Container: None
[2023-12-28T22:57:21.917Z] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[2023-12-28T22:57:21.947Z] Stop (30 ms): Run in Host: docker version --format {{.Server.APIVersion}}
[2023-12-28T22:57:21.947Z] 1.43
[2023-12-28T22:57:26.917Z] Start: Run in Host: git ls-remote https://github.com/Zenthae/gook.git
[2023-12-28T22:57:44.157Z] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[2023-12-28T22:57:44.190Z] Stop (33 ms): Run in Host: docker version --format {{.Server.APIVersion}}
[2023-12-28T22:57:44.190Z] 1.43
[2023-12-28T22:57:50.926Z] Start: Run in Host: git ls-remote https://github.com/Zenthae/it_management.git
[2023-12-28T23:04:41.330Z] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[2023-12-28T23:04:41.364Z] Stop (34 ms): Run in Host: docker version --format {{.Server.APIVersion}}
[2023-12-28T23:04:41.364Z] 1.43
[2023-12-28T23:04:46.461Z] Start: Run in Host: git ls-remote https://github.com/Zenthae/gook.git

Extension version: 0.327.0 VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:49:37.021Z) OS version: Windows_NT x64 10.0.22621 Modes:

evanyu10 commented 8 months ago

Just realized that this issue exists after submitting my own

JOSEPHGILBY commented 7 months ago

This appears to be the same as issue #9163 .

Zenthae commented 7 months ago

In my case, i'm not using ssh key, just plain git credentials manager

JOSEPHGILBY commented 7 months ago

I still want to get that issue some attention since they haven't even put these git ls-remote hanging issues on backlog.

Malix-Labs commented 3 months ago

still.

rgalonso commented 3 weeks ago

Please see my comments in #9377 and #9163.

In short, run the following in WSL:

git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/bin/git-credential-manager.exe"