[英]I can not pass “git-credential-manager get” step when pulling, fetching, pushing, cloning with vscode ssh
My environment is that.我的环境是这样的。
MyLaptop (Windows 10) <====> ServerPc (Windows 10) <====> github MyLaptop (Windows 10) <====> ServerPc (Windows 10) <====> github
When I connect ServerPc through remote control from my laptop, I can do full comment set of git.当我从笔记本电脑通过遥控器连接 ServerPc 时,我可以做 git 的完整评论集。
But When I connect through ssh, pull/fetch/push/clone are not possible to perform.但是当我通过 ssh 连接时,无法执行拉/取/推/克隆。 To more detail I did
set GIT_TRACE=1
, then found out that git process is pending on run_command: git-credential-manager get
I tried to look for the solution for it, But I can not.更详细地说,我确实
set GIT_TRACE=1
,然后发现 git 进程在run_command: git-credential-manager get
我试图为它寻找解决方案,但我不能。
Is anybody who has a similar problem here?有人在这里有类似的问题吗?
Updated更新
I still don't know the root cause.我仍然不知道根本原因。 But I found out that Microsoft already knows this issue and they suggest workaround like below at here( https://code.visualstudio.com/docs/remote/ssh ).
但我发现微软已经知道这个问题,他们建议如下解决方法( https://code.visualstudio.com/docs/remote/ssh )。
If you clone a Git repository using SSH and your SSH key has a passphrase, VS Code's pull and sync features may hang when running remotely.
如果您使用 SSH 克隆 Git 存储库,并且您的 SSH 密钥具有密码,则远程运行时 VS Code 的拉取和同步功能可能会挂起。 Either uses an SSH key without a passphrase, clone using HTTPS, or run git push from the command line to work around the issue.
使用不带密码的 SSH 密钥,使用 HTTPS 进行克隆,或者从命令行运行 git push 来解决此问题。
So I'll close this question now.所以我现在就结束这个问题。 Thank you for your advice everybody.
谢谢大家的建议。
Updated更新
I changed the method of auth from password to sshkey-without_passphrase.我将 auth 的方法从密码更改为 sshkey-without_passphrase。 Then, I followed @bk2204's guide that described in below.
然后,我按照下面描述的@bk2204 指南进行操作。 That work for me perfectly.
这对我来说很完美。 Thank you for your advice everybody.
谢谢大家的建议。
It's likely that what's happening here is that you have an askpass helper set in the environment (via GIT_ASKPASS
, SSH_ASKPASS
, or core.askpass
).这里发生的情况很可能是您在环境中设置了 askpass 助手(通过
GIT_ASKPASS
、 SSH_ASKPASS
或core.askpass
)。 Since Windows graphics are not network transparent, when you log into the server PC via SSH, you're invoking a graphical process on the server PC that you can't interact with.由于 Windows 图形不是网络透明的,因此当您通过 SSH 登录服务器 PC 时,您正在调用服务器 PC 上无法与之交互的图形进程。 If this is the case, you'll need to unset those variables or settings when using SSH.
如果是这种情况,您需要在使用 SSH 时取消设置这些变量或设置。
It could also be that you normally have saved credentials in the normal Windows credential store, but that isn't unlocked when you log in via SSH and the credential manager is hanging instead of handling it gracefully and prompting.也可能是您通常已将凭据保存在正常的 Windows 凭据存储区中,但是当您通过 SSH 登录时未解锁,并且凭据管理器处于挂起状态,而不是优雅地处理并提示。 If so, you could see if your SSH server has an option to unlock the credentials, or ask the purveyor of your credential manager to fix the hang.
如果是这样,您可以查看您的 SSH 服务器是否具有解锁凭据的选项,或者请您的凭据管理器的供应商修复挂起。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.