Windows上的Git+SSH。Git pull因“应用程序错误”而死亡

Windows上的Git+SSH。Git pull因“应用程序错误”而死亡,windows,git,windows-xp,ssh,Windows,Git,Windows Xp,Ssh,几天前,我在Windows上的git设置一直运行良好。我使用git和Cygwin。一天早上,cygwin命令行上的git pull抛出了以下错误 当我连接到其他服务器时,SSH工作正常。只有当它与git结合使用时,它才会因上述错误而消亡 Git跟踪输出如下所示 $ git pull trace: exec: 'git-pull' trace: run_command: 'git-pull' trace: built-in: git 'rev-parse' '--git-dir' trace: b

几天前,我在Windows上的git设置一直运行良好。我使用git和Cygwin。一天早上,cygwin命令行上的git pull抛出了以下错误

当我连接到其他服务器时,SSH工作正常。只有当它与git结合使用时,它才会因上述错误而消亡

Git跟踪输出如下所示

$ git pull
trace: exec: 'git-pull'
trace: run_command: 'git-pull'
trace: built-in: git 'rev-parse' '--git-dir'
trace: built-in: git 'rev-parse' '--show-toplevel'
setup: git_dir: .git
setup: worktree: c:/path/
setup: cwd: c:/path/
setup: prefix: (null)
trace: built-in: git 'ls-files' '-u'
setup: git_dir: .git
setup: worktree: c:/path/
setup: cwd: c:/path/
setup: prefix: (null)
trace: built-in: git 'symbolic-ref' '-q' 'HEAD'
setup: git_dir: .git
setup: worktree: c:/path
setup: cwd: c:/path
setup: prefix: (null)
trace: built-in: git 'config' '--bool' 'branch.master.rebase'
trace: built-in: git 'rev-parse' '-q' '--verify' 'HEAD'
setup: git_dir: .git
setup: worktree: c:/path
setup: cwd: c:/path
setup: prefix: (null)
trace: built-in: git 'fetch' '--update-head-ok'
trace: run_command: 'ssh' 'hostname' 'git-upload-pack '\''gitfile.git'\'''
fatal: The remote end hung up unexpectedly
SSH到同一个主机似乎很好。主机的配置在~/.ssh/config中

$ ssh -v hostname
OpenSSH_5.1p1, OpenSSL 0.9.8h 28 May 2008
debug1: Reading configuration data /home/user/.ssh/config
debug1: Applying options for sms
debug1: Connecting to gerrit.hostname.com [IP_ADDR] port PORT_NUM.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: Remote protocol version 2.0, remote software version SSHD-CORE-0.4.0-R897374
debug1: no match: SSHD-CORE-0.4.0-R897374
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host '[hostname.com]:PORT' is known and matches the RSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:34
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/user/.ssh/id_rsa_gupshup
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
gerrit: no shell available
debug1: channel 0: free: client-session, nchannels 1
Connection to hostname.com closed.
Transferred: sent 2584, received 1888 bytes, in 1.5 seconds
Bytes per second: sent 1744.8, received 1274.8
debug1: Exit status 127
使用Git\u SSH变量将SSH更改为C:\Program Files\Git\bin\SSH.exe会产生相同的错误屏幕。尝试用Putty的plink配置Git并没有产生任何结果。我没弄好

Git版本是Git版本1.7.4.msysgit.0


有没有解决此错误的方法?

请安装virtualbox和ubuntu服务器,而不是cygwin。完成后,在主机和来宾之间进行文件夹共享。Cygwin不值得它总是始终如一地付出痛苦。

安装virtualbox和ubuntu服务器,而不是Cygwin。完成后,在主机和来宾之间进行文件夹共享。Cygwin不值得它总是始终如一地带来痛苦。

我在使用windows xp时遇到了同样的问题。为了解决这个问题,我关闭了正在运行的mcafee并重新安装了git bash。该错误偶尔会出现一次,但我只是忽略它,然后重试该命令,它就正常工作了。

我在使用windows xp时遇到了同样的问题。为了解决这个问题,我关闭了正在运行的mcafee并重新安装了git bash。该错误偶尔会出现一次,但我只是忽略它,然后重试该命令,它就工作了。

您似乎将msysgit与cygwin混合在一起。卸载其中一个。这不是一个编程问题我在cygwin没有git。哪个git显示的位置是/cygdrive/c/Program Files/git/bin/git。请让我知道此问题的正确StackExchange站点。我建议您卸载msysgit并从cygwin安装程序中安装git运行cygwin安装程序并选择git软件包进行安装。错误是否会在msysgit和msysgit bash会话中持续出现,该会话是用msysgit打包的,而不是在cygwin中使用msysgit会话?将cygwin更新为最新版本,一切正常。谢谢@sinelaw&@VonC的帮助。你好像把msysgit和cygwin混在一起了。卸载其中一个。这不是一个编程问题我在cygwin没有git。哪个git显示的位置是/cygdrive/c/Program Files/git/bin/git。请让我知道此问题的正确StackExchange站点。我建议您卸载msysgit并从cygwin安装程序中安装git运行cygwin安装程序并选择git软件包进行安装。错误是否会在msysgit和msysgit bash会话中持续出现,该会话是用msysgit打包的,而不是在cygwin中使用msysgit会话?将cygwin更新为最新版本,一切正常。感谢@sinelaw&@VonC的帮助。