You can use git to connect to Bitbucket. Shell access is disabled
Asked by Steve B:

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.


Answers:
author: Christian Glockner
body: Hi Steve,

Try running

    export GIT_TRACE_PACKET=1export 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

comments: author: Steve B
body: 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.


author: Theodora Boudale
body: 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


author: Steve B
body: 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


author: Siva G
body: 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](https://community.atlassian.com/t5/image/serverpage/image-id/301874i003B8FD665CA79DD/image-dimensions/165x214?v=v2 "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.


author: Yahya Barghash
body: Hi [Christian Glockner](https://community.atlassian.com/t5/user/viewprofilepage/user-id/527595) you are just fantastic, thanks for the help


Tags: authentication

bitbucket-cloud

ssh