2012-03-03 68 views
1

我試圖在Mac上設置Github,操作系統版本爲Lion,我一直面臨這個令人討厭的錯誤。基本上,我隨後於本URL: http://help.github.com/mac-set-up-git/在Mac上設置Github時出現錯誤「寫入失敗:損壞的管道」

我總是停留在執行該命令"ssh -T [email protected]"

我試圖輸出調試消息,並且下面是消息日誌的步驟中提到的步驟。最後一條消息顯示它是由於錯誤'Write failed: Broken pipe'

請給我一個解決方案,以解決這個錯誤,如果你曾經遇到過這個錯誤,並能夠解決它。非常感謝。

user-users-macbook:.ssh useruser$ ssh -vT [email protected] 
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011 

debug1: Reading configuration data /etc/ssh_config 
debug1: Applying options for * 
debug1: Connecting to github.com [207.97.227.239] port 22. 
debug1: Connection established. 
debug1: identity file /Users/useruser/.ssh/id_rsa type 1 
debug1: identity file /Users/useruser/.ssh/id_rsa-cert type -1 
debug1: identity file /Users/useruser/.ssh/id_dsa type -1 
debug1: identity file /Users/useruser/.ssh/id_dsa-cert type -1 
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5github2 
debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH* 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_5.6 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: server->client aes128-ctr hmac-md5 none 
debug1: kex: client->server aes128-ctr hmac-md5 none 
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP 
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY 
debug1: Host 'github.com' is known and matches the RSA host key. 
debug1: Found key in /Users/useruser/.ssh/known_hosts:1 
debug1: ssh_rsa_verify: signature correct 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: SSH2_MSG_NEWKEYS received 
debug1: Roaming not allowed by server 
debug1: SSH2_MSG_SERVICE_REQUEST sent 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /Users/useruser/.ssh/id_rsa 
debug1: Remote: Forced command: gerve thsonvt 
debug1: Remote: Port forwarding disabled. 
debug1: Remote: X11 forwarding disabled. 
debug1: Remote: Agent forwarding disabled. 
debug1: Remote: Pty allocation disabled. 
debug1: Server accepts key: pkalg ssh-rsa blen 279 
debug1: Remote: Forced command: gerve thsonvt 
debug1: Remote: Port forwarding disabled. 
debug1: Remote: X11 forwarding disabled. 
debug1: Remote: Agent forwarding disabled. 
debug1: Remote: Pty allocation disabled. 
debug1: Authentication succeeded (publickey). 
Authenticated to github.com ([207.97.227.239]:22). 
debug1: channel 0: new [client-session] 
debug1: Requesting [email protected] 
debug1: Entering interactive session. 
debug1: Sending environment. 
debug1: Sending env LC_CTYPE = UTF-8 
Write failed: Broken pipe 

回答

0

嘗試增加

ClientAliveInterval 15 

原來的答覆:

嘗試添加下面一行到你的/ etc/SSH/ssh_config中

ServerAliveInterval 120 
+0

我試過了,但仍然存在相同的問題。 – Son 2012-03-07 13:48:10

+0

@Son編輯我的答案。 – ralphtheninja 2012-03-07 14:07:56

0

Write failed: Broken pipe只是意味着,爲whate原因,連接中斷。這可能是由於許多原因造成的,例如發生超時,或者由於互聯網連接中斷等導致服務器連接中斷。增加ServerAliveInterval可以提供幫助;在ServerFault詢問你是否瞭解了關於SSH設置的更多信息,因爲它對於StackOverflow是無關緊要的:)

對你而言,這是無關緊要的;從調試輸出中可以清楚地看到,您已經成功設置了SSH密鑰(debug1: Authentication succeeded (publickey)和以下行)。

它看起來像你不止一次地完成了該教程的step 5; debug1: Found key in /Users/useruser/.ssh/known_hosts:1意味着您已經將遠程主機添加到已知主機的列表中(這是在該教程的step 5中輸入yes的全部內容)。

隨意繼續下一節(Then: Set Up Your Info);你已經完成了step 1step 5的所有工作。

+0

謝謝,我會在ServerFault上發佈我的問題。 – Son 2012-03-07 13:48:31

相關問題