Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual Studio 2019 git问题:“;无法生成。。。ssh.exe:没有这样的文件或目录;获取/推送时_Git_Visual Studio_Visual Studio 2019_Openssh - Fatal编程技术网

Visual Studio 2019 git问题:“;无法生成。。。ssh.exe:没有这样的文件或目录;获取/推送时

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

无法让VS2019获取/推送到远程(恰好在GitLab上)。正确的配置是什么

  • 我正在使用内置的Windows10OpenSSH(
    C:\Windows\System32\OpenSSH

  • 我已经设置了env var
    GIT\u SSH=C:\Windows\System32\OpenSSH\SSH.exe

  • 通过
    ssh add
    将私钥加载到运行
    ssh代理
    服务中

  • 从一个普通的命令窗口(即,不是WSL bash shell)中,我可以尽情地推/取

  • 从VS2019开始,当repo打开时(
    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
      位于
      %PATH%
      中(这意味着,在启动VS2019之前,“
      其中ssh
      ”应该首先返回
      C:\Windows\System32\OpenSSH\ssh.exe
      ,然后返回
      C:\PATH\to\Git\usr\bin\ssh.exe

    我不需要为这些操作设置
    GIT\u SSH

    对于此配置,您是否将“凭证助手”保留为“未设置”,然后?@dav凭证助手?这是用于HTTPS凭据缓存的。只要您使用的是SSH URL,就根本不涉及凭证帮助器。