Bitbucket not setting up. Permission Denied Error GitLab

Recently I purchased Amazon Linux server. Bitnami Lamp is configured by default. I login on that server using Putty with a .ppk file that server host give to me. After login to server I generating a new SSH key using ssh-keygen. After that I copy key from ~/home/bitnami/.ssh/ and add that key to my Bitbucket account SSH keys section.
Now when I try to clone my project using SSH method then it gives me error

ssh: /opt/bitnami/common/lib/ no version information available (required by ssh)
ssh: /opt/bitnami/common/lib/ no version information available (required by ssh)
Permission denied (publickey).
fatal: Could not read from remote repository.

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

But when I clone using HTTPS it works but it keep asking me to providing my Bitbucket password every time I do some action. I don't want to provide my password because other developers also need to pull/push here in that repo. I want SSH method to work perfectly.
So how can I fix this Permission issue for SSH method?

1 answer

1 vote
Jim Redmond Atlassian Team Apr 12, 2017

If you run `ssh -i ~bitnami/.ssh/id_rsa` from that system, does it list the username associated with that key, or mention that the key is an access key for a given repo or set of repos?

Thanks for your fast reply.

when I run above command it gives me following output

PTY allocation request failed on channel 0
logged in as azamalvi.

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


Jim Redmond Atlassian Team Apr 12, 2017

If you're getting that, then the key is properly installed on the Bitbucket side of things. Is the key listed when you run `ssh-add -L` ?

when i run this coomand `ssh-add -L` i got below error

Could not open a connection to your authentication agent.

After that I run below command


`eval $(ssh-agent)`

and after that I run first command it shows The agent has no identities.
then I run `ssh-add` and then run `ssh-add -L` it now shows me

`ssh-rsa AAAAB3N************************************`

Now I run git clone same error Permission denied (publickey).

I actaully figer it out that it was due to folder issue. And I resolve it by following link (steps)

Now after clonig code when I open my project in browser it shows me other fiesl like view folder js folder. So I just want to know is that ok or I need to change some other permissions for that?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Thursday in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables ROLLBAR_ACCESS_TOKEN...

189 views 0 12
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you