Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to resolve issue of "You can use git or hg to connect to Bitbucket. Shell access is disabled"

Edited

I have set SSH Key for  by Bitbucket account but still I can't Clone my repo, i'm using

Ubuntu 20.04.1 LTS

 Where i run ssh -v git@bitbucket.org

debug1: Host 'bitbucket.org' is known and matches the RSA host key.

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

git clone git@bitbucket.org:myAccount/<repo_name>.git

git@bitbucket.org: Permission denied (publickey).
fatal: Could not read from remote repository.

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

 

1 answer

1 accepted

0 votes
Answer accepted

Hi @albogast kiyogoma ,

Could you please run the following command and share the output here? (You may remove the workspace id and repo name from the output)

GIT_SSH_COMMAND="ssh -vvv" git clone git@bitbucket.org:<workspace-id>/<repo_name>.git

There are many possible reasons for this error, and this command will give more verbose output and very possibly an indication of what may be going wrong.

A few more questions:

  • Do you have multiple SSH keys in the .ssh directory of the machine where you are trying to clone?
  • Is there a file named config in the .ssh directory, and if so, do you have any configuration in there for bitbucket.org?

Kind regards,
Theodora

Hello Theodora,

Thanks for your help. I was faced with multiple SSH keys in the .ssh.

Now I worked.

Like Theodora Boudale likes this

Good to hear, thank you for the update!

Like albogast kiyogoma likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,840 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you