Visual Studio 2019 git问题:“;无法生成。。。ssh.exe:没有这样的文件或目录;获取/推送时
无法让VS2019获取/推送到远程(恰好在GitLab上)。正确的配置是什么Visual Studio 2019 git问题:“;无法生成。。。ssh.exe:没有这样的文件或目录;获取/推送时,git,visual-studio,visual-studio-2019,openssh,Git,Visual Studio,Visual Studio 2019,Openssh,无法让VS2019获取/推送到远程(恰好在GitLab上)。正确的配置是什么 我正在使用内置的Windows10OpenSSH(C:\Windows\System32\OpenSSH) 我已经设置了env varGIT\u SSH=C:\Windows\System32\OpenSSH\SSH.exe 通过ssh add将私钥加载到运行ssh代理服务中 从一个普通的命令窗口(即,不是WSL bash shell)中,我可以尽情地推/取 从VS2019开始,当repo打开时(Git>loc
C:\Windows\System32\OpenSSH
)
GIT\u SSH=C:\Windows\System32\OpenSSH\SSH.exe
ssh add
将私钥加载到运行ssh代理
服务中
Git>localrepositories>myrepo
),当我尝试Git>Fetch
或Git>Push
时,我在输出窗口中获得以下信息:
Commit eebc0b4a created locally in repository r:\bbits\edu-bitcoin-staging
Opening repositories:
r:\bbits\edu-bitcoin-staging
Pushing master
Pushing to gitlab.com:bakins-bits/edu-bitcoin-staging.git
Error: cannot spawn C:\Windows\System32\OpenSSH\ssh.exe: No such file or directory
Error encountered while pushing to the remote repository: Git failed with a fatal error.
Git failed with a fatal error.
unable to fork
Failed to push to the remote repository. See the Output window for more details.
C:\Windows\System32\OpenSSH\ssh.exe:没有这样的文件或目录
——但这是正确的路径:
C:\>dir C:\Windows\System32\OpenSSH\ssh.exe
Volume in drive C is P70-MSVC
Volume Serial Number is 8240-9525
Directory of C:\Windows\System32\OpenSSH
10/15/2019 06:50 AM 882,688 ssh.exe
1 File(s) 882,688 bytes
0 Dir(s) 333,358,600,192 bytes free
首先检查VS2019的相同推/拉操作是否适用于在以下会话中启动的VS2019:
- 未设置GIT_SSH
位于ssh.exe
中(这意味着,在启动VS2019之前,“%PATH%
”应该首先返回其中ssh
,然后返回C:\Windows\System32\OpenSSH\ssh.exe
)C:\PATH\to\Git\usr\bin\ssh.exe
我不需要为这些操作设置
GIT\u SSH
。对于此配置,您是否将“凭证助手”保留为“未设置”,然后?@dav凭证助手?这是用于HTTPS凭据缓存的。只要您使用的是SSH URL,就根本不涉及凭证帮助器。