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.  

4 comments

Jim Redmond Atlassian Team Dec 18, 2017

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>]....

 I also used this command ssh-keygen to generate a new key, I found this Article very impressive while do search for My Laptop Issues with my Error 0xc0000185 , Need more updates which helps me in Solving my Issue.

Comment

Log in or Sign up to comment
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

451 views 6 9
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