Git+SSH on Windows. Git pull dies with "Application Error."
My git setup on Windows was working fine till few days back. I use git with Cygwin. One morning, "git pull" on cygwin command line threw the following error.
SSH works fine when I connect to other servers. Only when it is used in conjunction with git, it dies with aforementioned error.
Git trace output is shown below.
$ 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 to the same host seems to be fine. The configuration of the host is in ~/.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_开发者_Go百科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
Changing the SSH to C:\Program Files\Git\bin\ssh.exe with GIT_SSH variable produced the same error screen. Attempts to configure Git with plink (of Putty) did not yield any results. I couldn't get it right.
Git version is git version 1.7.4.msysgit.0
Any solutions for this error?
Instead of cygwin, install virtualbox and ubuntu server. Once that's done, do a folder share between host and guest. Cygwin is not worth the pain it always and consistently delivers.
I ran into the same issue, using windows xp. To solve the problem, i turned off mcafee that was running and re-installed git bash. The error shows up once in a while, but I just ignore it and retry the command and it works.
精彩评论