SourceTree 3.4.8 (Windows) Can't Push/Pull with SSH-based Repository
Asked by gougmcgrath:

Beginning with the SourceTree 3.4.8 (Windows) update, I can no longer push or pull. Everything else seems to work, but I'm having to use the git command line for push/pull. The error message is (personal info replaced with asterisks):

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v origin develop:develop  
Pushing to ssh://\*\*\*  
fatal: protocol error: bad line length character: \*\*\*  
Completed with errors, see above.

Is there a workaround for this until the bug gets fixed?

Thank you.


Answers:
author: dasvo
body: It seems that the problem is the new Putty version 0.76.

I replaced the integrated putty (just the putty folder - version 0.76) by the one from the previous version 3.4.7 (0.70.2-Sourcetree) and it works as before.

The putty folder is in (C:\\Users\\\<user\>\\AppData\\Local\\SourceTree\\app-3.4.8\\tools\\putty - or your user folder).

Is it possible that the official putty version is missing some fixes done by Atlassian ?

comments: author: Neo Anderson
body: Thx. That solved my problem as well.  
To be honest I was running on version 3.4.6 and from one to another day I wasn't able to work with my gitserver via ssh.  
Then - as the last hope - I did an update to 3.4.8 - nothing changed.

I was already despaired I searched on the net again and found this entry.   
I copied putty from 3.4.6 into 3.4.8 - I didn't expected that it helps - but it did.

From my perspektiv this issue must caused by another reason. My gues was to check the windows updates - but there weren't any updates done in the relevant time frame.

Amasing.


author: gougmcgrath
body: I finally tried this, and it worked for me as well. Also, the Putty problem persists in SourceTree 3.4.9. Sigh.


author: Luca
body: Hi,  
as discussed in another post [here](https://community.atlassian.com/t5/Sourcetree-questions/Bad-line-length-character-after-updating-to-Sourcetree-3-4-8/qaq-p/1967945), solution seems to be temporary downgrade to version 3.4.7.


author: Alexander Sorkin
body: The problem component is **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](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html).

The workaround is the following:

* Download Sourcetree for Windows 3.4.7 from the <https://www.sourcetreeapp.com/download-archives>
* Install it and copy file plink.exe from the program's directory: C:\\Users{yourname}\\AppData\\Local\\SourceTree\\app-3.4.7\\tools\\putty\\plink.exe to a temporary place, for example, C:\\temp
* Install the newest version of Sourcetree for Windows (currently it's 3.4.14)  
  Replace plink.exe with the saved version of plink.exe
* Enjoy working latest Sourcetree

I hope the Sourcetree team will fix this bug in future releases.


author: Andreas T?rner
body: I'm using SourceTree 3.4.11 and had the exact same issue. I resolved it as stated above by replacing the putty folder by the one included with 3.4.7!


author: Gopi Tholeti
body: Hi Goug,

Please try this method, it worked for me. <https://community.atlassian.com/t5/Sourcetree-questions/Cannot-connect-to-bitbucket-account-since-app-passwords/qaq-p/1971112>

Cheers,

Gopi

comments: author: gougmcgrath
body: I'm not using Bitbucket, so I don't believe this will help, but thank you.