error: RPC failed; curl 56 OpenSSL SSL_read: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac, errno 0 error: 7889 bytes of body are still expected fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output
-
https://stackoverflow.com/questions/46232906/git-clone-error-rpc-failed-curl-56-openssl-ssl-read-ssl-error-syscall-errno – Aniket Agarwal Jul 01 '21 at 10:23
-
1@AniketAgarwal https://meta.stackexchange.com/questions/10841/how-should-duplicate-questions-be-handled – Liam Jul 01 '21 at 10:26
1 Answers
When you use HTTPS, that's a tunneled HTTP connection inside a TLS tunnel. One of the features TLS provides is integrity: that is, an attacker cannot modify the data without being detected.
The message "decryption failed or bad record mac" means that someone or something (that is, a person or some device between your system and GitHub), did indeed tamper with the data, and as a result, the only thing to do is abort the connection. If OpenSSL didn't abort the connection in this case, you'd receive data that was corrupt or malicious.
There are a bunch of possibilities here. If you're using a proxy, non-default antivirus or firewall, or a TLS MITM device on your network, that is probably the problem. Those devices are known to have a variety of problems in their TLS implementations, some of which impact security. You should try without them installed, or use a different network.
It's also possible that you have a bad network card or some sort of broken network device between you that is causing problems. For example, some users have reported known breakage with AT&T, and other ISPs may have other problems.
You could also try cloning over SSH and see if that works. TLS middleboxes like the kinds I mentioned above won't be able to tamper with an SSH connection, and so that may be more reliable for you. Of course, if there's a network problem, it will also likely impact SSH, but at least it will be obvious to you that it's a network problem in that case.

- 64,793
- 6
- 84
- 100
-
Thanks for the answer. It seemed to be a connection problem. Fixed this by raising the buffer – communistfunnyman Jul 02 '21 at 10:27
-
1`http.postBuffer` has no effect on clones. [See the Git FAQ](https://git-scm.com/docs/gitfaq#http-postbuffer) for more details. What you were seeing is some sort of transient issue if that helped. – bk2204 Jul 03 '21 at 07:43