Private Key not working

Peter Bruhn
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!
February 3, 2018

Hi,

 

I have trouble connecting to bitbucket using a private key. I put the public key into my profile and changed the remote of my repo. My private key is ~/.ssh/id_rsa and it works for other matters.

> git remote -v
origin ssh://git@bitbucket.org/<project> (fetch)
origin ssh://git@bitbucket.org/<project> (push)

 

When I try to fetch I get an error:

> git fetch
fatal: protocol error: bad line length character: ?]11

 

But I can ssh to bitbucket:

> ssh -T git@bitbucket.org
logged in as <my_user>.

You can use git or hg to connect to Bitbucket. Shell access is disabled.

My system is:

> uname -a
Linux arch 4.14.15-1-ARCH #1 SMP PREEMPT Tue Jan 23 21:49:25 UTC 2018 x86_64 GNU/Linux

> git --version
git version 2.16.1

> ssh -V
OpenSSH_7.6p1, OpenSSL 1.1.0g 2 Nov 2017

Any idea what I am doing wrong?

Thanks for any hint

Peter

1 answer

0 votes
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 11, 2018

I don't see anything immediately wrong with what you've listed here, but Git has a couple environment variables that might help debugging:

GIT_SSH_COMMAND="ssh -vv" GIT_TRACE=1 git fetch

If you run that, does it indicate anything about where the process is failing?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events