Open chamhaw opened 1 year ago
Reolved. Maybe the docker documentation is not correct. Either git bash nor WSL2 cannot work. Only ssh-add on Windows can work.
PS C:\Users\hzh> Set-Service -Name ssh-agent -StartupType Manual
PS C:\Users\hzh> Start-Service ssh-agent
PS C:\Users\hzh> ssh-add -l
The agent has no identities.
PS C:\Users\hzh> ssh-add C:\Users\hzh\.ssh\id_ed25519
Identity added: C:\Users\hzh\.ssh\id_ed25519 (hzh@Win11-PC)
PS C:\Users\hzh>
But another issue.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
exit code 128
And sometimes hangs while cloning.
Preparing to clone inside a volume
Installing credential helpers...
done
Cloning into '/com.docker.devenvironments.code'...
Cloning from both Powershell and Git Bash works well.
I have the similar problem. It will be stuck at Cloning into '/com.docker.devenvironments.code'...
When I entry the docker/desktop-git-helper
container to run ssh -v -T git@github.com
and the log will be stuck at below 👇
debug1: Server host key: ssh-ed25519 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU
debug1: load_hostkeys: fopen /root/.ssh/known_hosts: No such file or directory
debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'github.com' is known and matches the ED25519 host key.
debug1: Found key in /etc/ssh/ssh_known_hosts:12
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
I have come up with a temporary solution. Using the https://xxx
when creating environment and it will success. Open in vscode and start a terminal so you can change the repository url like this 👇
git remote set-url origin git@github.com:xxxx
Still hangs. Did someone find a fix?
Hanging still, anything?
still hanging
Describe the bug Cannot clone repository with ssh from github or other platform.
To Reproduce Steps to reproduce the behavior:
Expected behavior
git clone git@github.com:argoproj/argo-rollouts.git
could workScreenshots
Desktop (please complete the following information):
Version of Docker Desktop:
Version 4.14.0 (91374) docker version
docker info
Additional context Start ssh agent for git bash on windows (~/.profile)
Start ssh agent for WSL2(~/.profile)