cari

Rumah  >  Soal Jawab  >  teks badan

如何解决git fetch时遇到的bad packget length问题

下面的调试信息或者会有帮助。

$ git fetch
Bad packet length 1397966893.
Disconnecting: Packet corrupt
fatal: The remote end hung up unexpectedly

$ ssh -T git@coding.net -vvv
OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/honwhy/.ssh/config
debug1: /home/honwhy/.ssh/config line 1: Applying options for coding.net
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to coding.net [118.192.93.38] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/honwhy/.ssh/coding_rsa" as a RSA1 public key
debug1: identity file /home/honwhy/.ssh/coding_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/honwhy/.ssh/coding_rsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.4
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "coding.net" from file "/home/honwhy/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
debug1: SSH2_MSG_KEXINIT sent
Bad packet length 1397966893.
Disconnecting: Packet corrupt
某草草某草草2875 hari yang lalu1172

membalas semua(1)saya akan balas

  • 某草草

    某草草2017-04-27 09:04:44

    Selepas carian saya, masalah telah diselesaikan
    Rujuk dua pautan ini
    https://blog.flameeyes.eu/2011/01/mostly-unknown-openssh-tricks
    https://blogs.oracle.com/janp/entry/ssh_messages_code_bad_packet
    Berikut ialah konfigurasi ~/.ssh/config yang diubah suai

    Host coding.net
    HostName coding.net
    User myemail@mydomain.com
    IdentityFile /home/honwhy/.ssh/coding_rsa
    Protocol 2
    ControlMaster auto
    ControlPersist yes
    

    Dua baris konfigurasi ini lebih penting

    ControlMaster auto
    ControlPersist yes
    

    Ralat masih akan digesa apabila menyambung buat kali pertama, tetapi sambungan akan menjadi normal untuk kali kedua.
    Anda harus benar-benar membaca manual atau RFC untuk proses terperinci Pautan kedua juga menerangkannya dengan sangat khusus.

    • AKHIRNYA

    balas
    0
  • Batalbalas