【问题标题】:cannot sync from android repository无法从 android 存储库同步
【发布时间】:2009-11-03 10:17:25
【问题描述】:

我正在尝试根据http://source.android.com/download 手册进行同步, 所以一切都很好,除了同步:)

repo sync
...
Fetching projects:   5% (8/143)  
Initializing project platform/development ...
fatal: The remote end hung up unexpectedly
error: Cannot fetch platform/development
.. or
Fetching projects:   2% (3/143)  fatal: read error (Connection reset by peer)
error: Cannot fetch platform/bootable/diskinstaller

我找到了这个issue,但没有有价值的信息

有什么想法吗?

【问题讨论】:

  • 您可以添加有关您的网络设置的任何信息吗?任何代理,防火墙等?你能可靠地 ping android.git.kernel.org 吗?

标签: android git repository


【解决方案1】:

是的,继续重试,即使我已经 100% 成功同步 repo,再次重试可能会出错:

例如,

repo sync
Fetching projects: 100% (171/171), done.  

honeyman:/root/download/android/myandroid>repo sync
Fetching projects:   7% (12/171)  fatal: protocol error: bad line length character
error: Cannot fetch device/htc/passion-common

honeyman:/root/download/android/myandroid>repo sync
Fetching projects:  10% (18/171)  fatal: protocol error: bad line length character
error: Cannot fetch platform/external/blktrace

honeyman:/root/download/android/myandroid>repo sync
Fetching projects:  48% (83/171)  fatal: protocol error: bad line length character
error: Cannot fetch platform/external/safe-iop

honeyman:/root/download/android/myandroid>repo sync
Fetching projects:  30% (52/171)  fatal: protocol error: bad line length character
error: Cannot fetch platform/external/iptables

honeyman:/root/download/android/myandroid>repo sync
Fetching projects:   1% (2/171)  fatal: protocol error: bad line length character
error: Cannot fetch platform/bootable/bootloader/legacy

幸运的是,我发现原因是因为我的以太网 RJ45 端口不可靠(执行“dmesg”):

[ 8957.756324] e1000e: eth0 NIC Link is Down
[ 8959.616964] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
[ 8959.616977] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
[ 8974.796164] e1000e: eth0 NIC Link is Down
[ 8993.905005] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
[ 8993.905019] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
[ 9020.320169] e1000e: eth0 NIC Link is Down
[ 9125.809081] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
[ 9125.809094] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
[10033.472196] e1000e: eth0 NIC Link is Down
[10089.552945] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
[10089.552959] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
[13714.044175] e1000e: eth0 NIC Link is Down
[13715.696949] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
[13715.696963] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO

答案是重试。

【讨论】:

    【解决方案2】:

    似乎有解决此错误的方法(将缺少的 return False 添加到预连接):

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-12
      • 2017-12-02
      • 2017-09-15
      • 1970-01-01
      • 1970-01-01
      • 2020-08-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多