简体   繁体   English

使用 vscode ssh 拉取、获取、推送、克隆时,我无法通过“git-credential-manager get”步骤

[英]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_ASKPASSSSH_ASKPASScore.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.

相关问题 Microsoft Git-Credential-Manager - Microsoft Git-Credential-Manager 在OSX上的Mac中使用git-credential-manager时出现Java错误? - Java error when using git-credential-manager in Mac on OSX? “致命:身份验证失败”与 git-credential-manager - "fatal: Authentication failed" with git-credential-manager 如何修复 WSL2 中的 git-credential-manager 问题? - How do I fix git-credential-manager issue in WSL2? Git 无法访问 jarfile /usr/local/Cellar/git-credential-manager/2.0.3/libexec/git-credential-manager-2.0.3.jar - Git Unable to access jarfile /usr/local/Cellar/git-credential-manager/2.0.3/libexec/git-credential-manager-2.0.3.jar 安装Microsoft git-credential-manager后失败git推送到专用仓库中,找不到存储库 - Fail git push into private repo after installing microsoft git-credential-manager, repository not found 如何配置远程Git存储库以进行推送,不进行提取或拉取? - How can a remote Git repository be configured for pushing to, no fetching or pulling? 当使用git ssh /特定端口拉动时,vscode不显示密码提示 - Vscode not showing password prompt when pulling with git ssh / specific port 使用 git 推送或拉取时如何抑制存储库 url? - How do I suppress the repository url when pushing or pulling with git? 如何在 Ubuntu 上使用 Git Credential Manager 存储 Github 令牌? - How can I store Github token with Git Credential Manager on Ubuntu?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM