The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can pull from repo, but cannot push. "fatal: protocol error: bad line length character: auth"

Justin Alcorn
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2022

Hello.

I created a repository in bitbucket cloud and added my ssh key to my user profile.

 

I am able to successfully clone the repository and pull down new changes. But whenever I push, I am met with the following error:
"fatal: protocol error: bad line length character: auth"

 

I am using Git Bash for Windows. git --version returns "git version 2.35.1.windows.2"

So far I have tried removing and recreating ssh keys, testing my connection to bitbucket cloud, restarting my PC, deleting the whole repository in bitbucket and recreating it, and forcing ssh to use the identity file. Nothing seems to work.

 

I was able to pull AND push from an ec2 instance with no issues. I suspect it might be a bug with git for windows.

 

I'm at my wits end and can't find any solutions from google that actually work on my machine. Anyone have any ideas to solve this?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 13, 2022

Hey Justin!

  • Is the issue happening only with this repository?
  • Are you authenticating through SSH or HTTPS?
  • Does the push work using other authentication methods? (i.e.: SSH if you are using HTTPS, HTTPS if you are using SSH)
  • Please send us the output of the verbose push command as given below:
    If you are using Linux
    GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push

    If you are using Windows
    set GIT_TRACE_PACKET=1

    set GIT_TRACE=1

    set GIT_CURL_VERBOSE=1

    git push

Cheers!

- Ben (Bitbucket Cloud Support) 

Greg Matthew Crossley
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 9, 2022

@Justin Alcorn, did you ever get this resolved? I'm having the exact same issue.

wilddata
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 10, 2024

I'm having the exact same issue.
Anything I can try?

TAGS
AUG Leaders

Atlassian Community Events