2011-03-16 75 views
1

我在Windows上的git安裝程序在幾天前一直工作正常。我用Cygwin使用git。一天早晨,cygwin命令行上的「git pull」拋出以下錯誤。當我連接到其他服務器Windows上的Git + SSH。 Git pull會因「應用程序錯誤」而死亡。

SSH Error for 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 /配置

$ 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 [email protected] 
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 

更改SSH到C:\ Program Files文件\ GIT中\ BIN \與GIT_SSH可變ssh.exe產生相同的錯誤屏幕。試圖用plink(Putty)配置Git沒有產生任何結果。我無法理解。

的Git版本git version 1.7.4.msysgit.0

此錯誤的任何解決方案?

+0

你似乎混合msysgit與cygwin。卸載其中一個。這不是一個編程問題。 :) – sinelaw 2011-03-16 11:48:00

+0

我沒有git在cygwin中。 「哪個git」顯示的位置是「/ cygdrive/c/Program Files/Git/bin/git」。請讓我知道這個問題的權利StackExchange網站。 – 2011-03-16 11:51:31

+0

我建議你卸載msysgit並從cygwin安裝中安裝git(運行cygwin安裝程序並選擇git軟件包進行安裝)。 – sinelaw 2011-03-16 11:53:34

回答

1

代替cygwin,安裝virtualbox和ubuntu服務器。完成後,在主機和來賓之間進行文件夾共享。 Cygwin不值得它始終如一地提供的痛苦。

0

我遇到了同樣的問題,使用Windows XP。爲了解決這個問題,我關閉了正在運行的mcafee,並重新安裝了git bash。該錯誤偶爾會出現,但我忽略它並重試該命令並且它可以正常工作。

相關問題