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
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,339 views 8 11
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