解决git clone报错error: RPC failed; result=35, HTTP code = 0

安装odoo的时候,git clone下载odoo进报错
error: RPC failed; result=35, HTTP code = 0

[odoo@node02 src]$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo/odoo14
Cloning into '/opt/odoo/odoo14'...
error: RPC failed; result=35, HTTP code = 0
fatal: The remote end hung up unexpectedly

网上说这个错误缓存小了

解决:把缓存设定在50M或更大
我设定50M

git config --global http.postBuffer 50M

上面错误不出现了,但出现新的错误

[odoo@node02 src]$ git config --global http.postBuffer 50M
[odoo@node02 src]$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo/odoo14
Cloning into '/opt/odoo/odoo14'...
fatal: unable to access 'https://www.github.com/odoo/odoo/': Encountered end of file

这个错误,fatal: unable to access ‘https://www.github.com/odoo/odoo/’: Encountered end of file
按网上解决方法:、
git config --global http.proxy
git config --global --unset http.proxy

还是不行。

[odoo@node02 src]$ git config --global http.proxy
[odoo@node02 src]$ git config --global --unset http.proxy
[odoo@node02 src]$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo/odoo14
Cloning into '/opt/odoo/odoo14'...
fatal: unable to access 'https://www.github.com/odoo/odoo/': Encountered end of file
[odoo@node02 src]$ rm ~/.gitconfig
[odoo@node02 src]$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo/odoo14
Cloning into '/opt/odoo/odoo14'...
fatal: unable to access 'https://www.github.com/odoo/odoo/': Encountered end of file

终极解决:
将https改为git 就成功了git clone git://www.github.com/****

[odoo@node02 src]$ git clone git://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo/odoo14     
Cloning into '/opt/odoo/odoo14'...
remote: Enumerating objects: 31507, done.
remote: Counting objects: 100% (31507/31507), done.
remote: Compressing objects: 100% (25092/25092), done.
Receiving objects:  20% (6511/31507), 22.17 MiB | 64.00 KiB/s    

你可能感兴趣的:(Linux,linux,git)