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

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

albogast kiyogoma February 4, 2021

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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2021

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

albogast kiyogoma February 12, 2021

Hello Theodora,

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

Now I worked.

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 15, 2021

Good to hear, thank you for the update!

Like albogast kiyogoma likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events