How to Solve Git clone Error: error: RPC failed; result=35, HTTP code = 0

When installing odoo, GIT clone downloads odoo and reports an error
error: RPC failed; result=35, HTTP code = 0

[[email protected] 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

The Internet says the error cache is small

Solution: set the cache to 50m or greater
I set 50m

git config --global http.postBuffer 50M

The above error does not appear, but a new error appears

[[email protected] src]$ git config --global http.postBuffer 50M
[[email protected] 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

This is a mistake, fatal: unable to access ‘ https://www.github.com/odoo/odoo/ ’: Encountered end of file
clicking on the Internet:
git config –global http.proxy
git config –global –unset http.proxy

or not.

[[email protected] src]$ git config --global http.proxy
[[email protected] src]$ git config --global --unset http.proxy
[[email protected] 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
[[email protected] src]$ rm ~/.gitconfig
[odo[email protected] 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

The ultimate solution:
change HTTPS to GIT and you will succeed in Git clone git://www.github.com/ ****

[[email protected] 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    


Read More: