Git fetch fails when using from two different computers

Viewed 148

I have Atom 1.58.0 x64 installed on a Windows PC and a Mac. When either the PC or the Mac is able to push/pull to my GitHub repo, the other will not. On loading Atom, a message that my repo doesn't exist flashes on the screen and when I fetch, the error message is fatal: protocol error: bad line length 2.

I understand that this may be connected to the anti-virus program that my school requires. If I start over and clone the repo locally, I'm able to push/pull - until I do the same on the other computer. At which point, only the most recently cloned installation works. I would be very grateful for any assistance.

1 Answers

The message protocol error: bad line length means that something is tampering with your connection and corrupting the data.

This is very common with anti-virus and firewall programs, many of which perform TLS interception to scan for "threats". Unfortunately, they also tend to break Git very frequently and often introduce security vulnerabilities. Other types of TLS middleboxes, such as proxies, can also cause this.

Ideally you will remove this software from all systems, and on Windows, just use Windows Defender instead. If you cannot do that, you'll need to turn off TLS interception, which may be specified as "scanning encrypted connections". You can also switch to using SSH instead if that's an option.

Related