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 votes

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.


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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

655 views 0 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot