Bad line length character after updating to Sourcetree 3.4.8
Asked by Luca:

Hello,

i am experiencing an issue already discussed both here and on stackoverflow, concerning this error:

```
fatal: protocol error: bad line length character: git_
```

but most solutions suggest the problem lies in the server.

Thing is, this happens only on my desktop where i've updated to SourceTree 3.4.8; if i try to fetch/push from my laptop to the very same server it works just fine.  
On my laptop i delayed the update, and still running SourceTree ver. 3.4.7.

As for the server address, which includes the 4 bytes of the error message reported above, it is in fact:

```
Pushing to ssh://git_user@myIp:myPort/volume1/git_repos/myRepo.git
```

Pageant is running on the client, although there is no ssh key, since i am hosting the server in my house and there's just a password auth for the user *git_user*.

I also tried removing the *passwd* file, to see if it was failing authentication, but pushing/fetching won't even get to the authentication phase: i reckon the error happens before auth, since i'm not being asked to input the password again.

Aside from testing with both machines, with the same configuration, where one works and the other doesn't, i'm quite stuck with troubleshooting... the only thing i could concieve was the version mismatch.  
I should probably try to downgrade and see if it solves the issue.

Can anyone provide additional feedback?  
Thanks


Answers:
author: asundust
body: i have the same problem

my git url is "git@192.168.10.22:/home/git/abc3.git"

Version downgrade to 3.4.7, it's works

comments: author: zeravcic
body: +1


author: Luca
body: Thanks, seems that will be the solution for now.


author: zaazbb
body: +1


author: zaazbb
body: i have to push on terminal now.


author: danobrega
body: Had a similar issue with the error  

"protocol error: bad line length character: \| Pa"  

Downgraded from 3.4.9 to 3.4.7 and its working again.  

Running commands manually on the Terminal also worked. For example, if we pressed the "Push" button we would have that error, but if we executed "git push" in the terminal the push operation would run without errors.


author: Sign Inaccount
body: The same error is still in version 3.4.11. Nothing helps.


author: Artur Litau
body: On version 3.4.9 you'll have to remove the :  
So what you wanna use is  
"git@192.168.10.22/home/git/abc3.git"


author: paul watje
body: On WIndows 10, this fixed this issue on version 3.4.12 and earlier versions.

Assuming you have an SSH private key setup, under Tools -\> Options -\> General tab

Change the SSH Client entry to "OpenSSH", and click OK. It will open a command window and ask for your for passcode.

It then works for me.

comments: author: Abedeljan Abenasa
body: Thank you, sir! It works for me.


author: Wenxin Wang
body: I upgraded from 3.4.9 to 3.4.14, and this solution works for me. Thank you! Only it didn't ask me for passcode.


author: Anders Harvyl
body: Downgrading to 3.4.7 worked for me too. Indeed a relief.


author: Andreas T?rner
body: Im using SourceTree 3.4.11 and had the exact same issue. I resolved it after a tip in another thread in this forum by replacing the putty folder by the one included with 3.4.7.

comments: author: Javier Camacho
body: It's works. The folder, in my case, was in C:\\Users\\MYUSER\\AppData\\Local\\SourceTree\\app-3.4.13\\tools\\putty


author: Juergen Jakel
body: Same here - thanks for this solution.

Hope the Atlassian Team will fix this in further versions.


author: Gustavo
body: Finally found a solution to connect with latest version of Sourcetree under Windows. Is a bit tricky but works. I had to login to server via ssh and create private and public keys in the server:

ssh-keygen -t rsa -b 4096 -C "user@domain.com"  
(change this to your site user and domain)

then copy .ssh/id_rsa.pub contents into .ssh/authorized_keys file (create this if file don't exists)

Download id_rsa.pub to my machine, import with PuTTygen and convert to private key (with ppk format)

Inside Sourcetree use Putty as client and the recent created ppk SSH key.

It's a bit annoying if you have multiple sites and have to change the ppk key to use on each one. I hope they fix this as in previous versions the procedure was simpler.

comments: author: Javier
body: It's works for me. Thanks! :)


author: Gustavo
body: Same problem using Windows 10, and the only solution is revert to 3.4.6

comments: author: paul watje
body: Did you try the seting the ssh client to openssh solution above?


author: Gustavo
body: Yes, but didn't work for me


Tags: atl-gruland

windows