Forums

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

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

Steve B April 1, 2022

The ssh connection doesn't seem to work, I have setup my ssh key properly but when I run the command "$ ssh -T git@bitbucket.org" I get this response:
$ ssh -T git@bitbucket.org
authenticated via ssh key.

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

And then when I try to clone a repository I get this:
$ git clone git@bitbucket.org:<workspace-id>/<repo-slug>.git
Cloning into 'canisource'...
FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I do have write access to the repository. I've deleted the .ssh folder, generate a new key, link my new pub key to my account to have a fresh and clean folder and even then I still have the error.

3 answers

1 vote
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 3, 2022

Hi Steve,

Try running 

export GIT_TRACE_PACKET=1
export GIT_TRACE=1 
export GIT_CURL_VERBOSE=1

and then running the git command again, and see what the output says.

Cheers,

Christian

Premier Support Engineer

Atlassian

Steve B April 5, 2022

Hi Christian,

this is what I got when running "git clone" after running your command:

$ git clone git@bitbucket.org:<workspace-id>/<repo-slug>.git
16:57:37.068385 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
16:57:37.070381 git.c:455 trace: built-in: git clone git@bitbucket.org:cyclonedesign/canisource.git
Cloning into 'canisource'...
16:57:37.139195 run-command.c:668 trace: run_command: unset GIT_DIR; 'C:\Program Files\PuTTY\plink.exe' git@bitbucket.org 'git-upload-pack '\''<workspace-id>/<repo-slug>.git'\'''
FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 8, 2022

Hi Steve,

The output of the clone command shows that Git is using PuTTY as an SSH client.

  • Did you use PuTTY to generate the SSH key pair?
  • If so, is Pageant running on your machine, and does it have the key loaded?

Just a heads up, I removed the workspace id and repo name from your posts to comply with our privacy policy.

Kind regards,
Theodora

Steve B April 8, 2022

Hi Theodora,

 

If I open Pageant and add the key it work. Is there a way to not use Putty as an SSH client ?
I've tried deleting the Environment Variable name "GIT_SSH", and did a fresh install of git but it still want to use putty even if I selected the build in solution during the install.

 

Thank you

0 votes
Siva G
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!
January 22, 2024

Actually,

In my case, I lost my MFA google authenticator account on my old device. and tried to setup on a new device. even at this moment I don't have the recovery codes also. 

 

But, the below way helps me.

image.png

Click : forgot code option  below to the text box > Click :  "send reset request to your email" > you will receive an email on your registered email account stating that wait for 24Hrs > after that specified time , you will receive an oneTimeLogin link on your email with 2 options : 

  • If you have a new device, disable two-step verification and set it up for your new device.
  • If you want to keep using your existing device, create a new emergency recovery key, and store it securely.

with this you can get in to your account. 

0 votes
Yahya Barghash
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!
May 23, 2023

Hi Christian Glockner you are just fantastic, thanks for the help

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events