报错如下:
git clone https://github.com/pingcap/tidb.git
Cloning into 'tidb'...
remote: Enumerating objects: 331426, done.
remote: Counting objects: 100% (1769/1769), done.
remote: Compressing objects: 100% (1549/1549), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
error: 6372 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
解决方法如下:
1、修改git配置,无效
git config --global http.lowSpeedTime 999999
git config --global http.lowSpeedLimit 0
git config --global http.postBuffer 524288000
git config --global http.version HTTP/1.1
2、配置github的ssh,通过ssh获取代码
生成密钥如下:
➜ ~ ssh-keygen -t rsa -C "*******@163.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/longfei/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/longfei/.ssh/id_rsa
Your public key has been saved in /Users/longfei/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:tRgpjDqz/PwfDnsNb68XUkXMtgbptFyC+lmqzRXVHNQ [email protected]
The key's randomart image is:
+---[RSA 3072]----+
| . =o=o|
| o .. = B E|
| . o o..+ O . |
| . ..+ .B o |
| + S..= o |
| . + . = o |
| o . .B o . |
| o +o.* . |
| o.ooo..+. |
+----[SHA256]-----+
➜ ~ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDmA/4ht1G3MvES9URxoKWHN/sewCwdwqX+ldDhpaWf4OsBV3GR7JEP9k/rVPcISxrJ5qfnvPVvX3K/swSWd6vcnsEM+3Ea7KPycUTy7P7VCo4QA31QH7uK/f+kfdpo+riteutO2b0/FO1vKEqIRx5+z+UmSAt54zyQtsUC20/EJkMUeWg1otip7Hejs2KPTqHLWc5ahEoW+gjJXmtVK1UIYhAiY+yjon46tYldRPDAwGR2MDTK7X7bYiYOVTBwQ9ToWOWs1lxm395R6xAXTKeVoHKmreGrolNVV8Eg8kz5qAJvVM6kSK7YaAR4xzmii3PoF6S2/05K2RNZ1twNOtv29TxSMbCQlQVaqnABCGZ6y0cplHwYtXREQ6zBkhlTnwqb29FQ+ETRXCIg+1zar5zUSfxSUTwnyHKzpWSTvkLVwNWJfsZ2+dquxHKNmcII2Ug0cIB8GeTApC+W5tKbUYbmJ9nbfm/Aw0jXWlG8RTJA1CpH1RKoLlmcF3wd6Ef4wZM= *******@163.com
登录github,选择settings
➜ SSH and GPG keys
➜ New SSH key
添加自己的公钥。
重新clone
➜ tidb_source git clone [email protected]:pingcap/tidb.git
Cloning into 'tidb'...
remote: Enumerating objects: 331434, done.
remote: Counting objects: 100% (1777/1777), done.
remote: Compressing objects: 100% (1553/1553), done.
Receiving objects: 100% (331434/331434), 412.07 MiB | 453.00 KiB/s, done.
remote: Total 331434 (delta 853), reused 678 (delta 221), pack-reused 329657
Resolving deltas: 100% (260664/260664), done.
Updating files: 100% (5950/5950), done.
完成!
标签:git,clone,rsa,objects,done,ssh,报错,100% From: https://www.cnblogs.com/longfeij/p/18248406