permission denied (publickey)

Hi there,

 

I have a issue while I am working on my project, I used to work with my work laptop unfortunately i have a issue with that laptop and I have been replace another laptop. Now when i am trying a command "composer update" its giving me as Permission denied(publickey). Can you please help me with that.  

3 comments

Have you generated a new SSH key on the new laptop, and added the public half to your Bitbucket account?

Hi James, Thanks for your response.

Yes I generated a new key in my new laptop by using command "ssh-keygen " and copied to bit bucket ssh security. But I am getting error as 

$ composer update
Loading composer repositories with package information
Failed to update git@bitbucket.org:redbox-digital/ess_m2epro.git, package information from this repository may be outdated


[RuntimeException]
Failed to execute git clone --mirror "git@bitbucket.org:redbox-digital/flagbit_googlewebmastertools.git" "C:/Users/Sathya.Chilumula/AppData/Local/Composer/vcs/git-bitbucket.org-redbox-digital-flagbit-googlewebmastertools.git/"
Cloning into bare repository 'C:/Users/Sathya.Chilumula/AppData/Local/Composer/vcs/git-bitbucket.org-redbox-digital-flagbit-googlewebmastertools.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.


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]....

 

Can you help me with this please?

I found this error also "ssh: Could not resolve hostname rsa: Name or service not known"

Warning: Permanently added ' (ECDSA) to the list of known hosts.a.com: Permission denied (publickey).

You might want to check your composer file to check if the repository is the one that belongs to the repo in the error message.

git-bitbucket.org-redbox-digital-flagbit-googlewebmastertools.git

Then there are some sanity checks that you could do, I recommend working these down one-by-one:

  • Check if your ~/.ssh/id_rsa.pub is in your SSH keys on Bitbucket
  • ssh-add ~/.ssh/id_rsa.pub
  • Check if you've got rights on all repo's added to your json file

After this, you should be able to composer install/update.

Yes I generated a new key in my new laptop by using command "ssh-keygen " and copied to bit bucket ssh security. But I am getting error as 

$ composer update
Loading composer repositories with package information
Failed to update git@bitbucket.org:redbox-digital/ess_m2epro.git, package information from this repository may be outdated


[RuntimeException]
Failed to execute git clone --mirror "git@bitbucket.org:redbox-digital/flagbit_googlewebmastertools.git" "C:/Users/Sathya.Chilumula/AppData/Local/Composer/vcs/git-bitbucket.org-redbox-digital-flagbit-googlewebmastertools.git/"
Cloning into bare repository 'C:/Users/Sathya.Chilumula/AppData/Local/Composer/vcs/git-bitbucket.org-redbox-digital-flagbit-googlewebmastertools.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.


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]....

Comment

Log in or Sign up to comment
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

29,453 views 26 12
Join discussion

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