高通专有代码git下载报错
时间:10-02
整理:3721RD
点击:
1, 用git clone 高通专有代码时报错:
gnutls_handshake() failed: A TLS packet with unexpected length was received.
这个问题和openssl有关,需要重新编译git
在网上找到解决方案如下:(这个链接:http://askubuntu.com/questions/1 ... ng-to-https-servers)
Got reason of the problem, it was gnutls package. It's working weird behind a proxy. But openssl is working fine even in weak network. So workaround is that we should compile git with openssl. To do this, run the following commands:
sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
sudo apt-get build-dep git
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
dpkg-source -x git_1.7.9.5-1.dsc
cd git-1.7.9.5
(Remember to replace 1.7.9.5 with the actual version of git in your system.)
Then, edit debian/control file (run the command: gksu gedit debian/control) and replace all instances of libcurl4-gnutls-dev with libcurl4-openssl-dev.
Then build the package (if it's failing on test, you can remove the line TEST=test fROM the file debian/rules):
sudo dpkg-buildpackage -rfakeroot -b
Install new package:
i386: sudo dpkg -i ../git_1.7.9.5-1_i386.deb
x86_64: sudo dpkg -i ../git_1.7.9.5-1_amd64.deb
2, 另外还有一个问题,网速比较差的时候,curl的postBuffer 默认值较小导致出现如下错误
git clone: error: RPC failed; result=18, HTTP code = 200 解决办法
解决方法:加大curl的postBuffer 默认值大小。
git config --global http.postBuffer 524288000
git config --list
这里把postBuffer设置成500M
gnutls_handshake() failed: A TLS packet with unexpected length was received.
这个问题和openssl有关,需要重新编译git
在网上找到解决方案如下:(这个链接:http://askubuntu.com/questions/1 ... ng-to-https-servers)
Got reason of the problem, it was gnutls package. It's working weird behind a proxy. But openssl is working fine even in weak network. So workaround is that we should compile git with openssl. To do this, run the following commands:
sudo apt-get update
sudo apt-get install build-essential fakeroot dpkg-dev libcurl4-openssl-dev
sudo apt-get build-dep git
mkdir ~/git-openssl
cd ~/git-openssl
apt-get source git
dpkg-source -x git_1.7.9.5-1.dsc
cd git-1.7.9.5
(Remember to replace 1.7.9.5 with the actual version of git in your system.)
Then, edit debian/control file (run the command: gksu gedit debian/control) and replace all instances of libcurl4-gnutls-dev with libcurl4-openssl-dev.
Then build the package (if it's failing on test, you can remove the line TEST=test fROM the file debian/rules):
sudo dpkg-buildpackage -rfakeroot -b
Install new package:
i386: sudo dpkg -i ../git_1.7.9.5-1_i386.deb
x86_64: sudo dpkg -i ../git_1.7.9.5-1_amd64.deb
2, 另外还有一个问题,网速比较差的时候,curl的postBuffer 默认值较小导致出现如下错误
git clone: error: RPC failed; result=18, HTTP code = 200 解决办法
解决方法:加大curl的postBuffer 默认值大小。
git config --global http.postBuffer 524288000
git config --list
这里把postBuffer设置成500M