I'm using Atlassian Sourcetree for Windows, and after a recent upgrade, it stopped working with some of my repositories.
The repositories are configured for passwordless access via SSH protocol (using public and private keys).
When I try to fetch or pull the repository, it shows the following error, where "xxxx" is the first 4 chars of my user name:
fatal: protocol error: bad line length character: xxxx
FATAL ERROR: Error reading from console: Error 109: The pipe has been ended.
Completed with errors, see above.
Before the upgrade, everything worked well.
I tested many versions (3.3.9, 3.4.0, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.4.7) and found that the last working version is 3.4.7, but more recent versions (3.4.8, 3.4.9, 3.4.10, 3.4.11, 3.4.12, 3.4.13 and 3.4.14) are broken in this respect.
What's wrong and how can I fix the error?
The problem component, in my case, was plink.exe (part of Putty), bundled with Sourcetree.
Sourcetree 3.4.7 has plink.exe version "0.70.2-sourcetree" compiled specially for the Sourcetree project, but more recent versions have common plink.exe from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html.
The workaround is the following:
I hope the Sourcetree team will fix this bug in future releases.