Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Permission denied (publickey) submodule after upgrade

Thomas July 18, 2019

I have just upgraded both Bitbucket and Bamboo and now Linked repositories with submodules have stopped working

simple 17-Jul-2019 19:59:45 Warning: Permanently added '[]:7999,[]:7999' (RSA) to the list of known hosts.
simple 17-Jul-2019 19:59:45 Permission denied (publickey).
simple 17-Jul-2019 19:59:45 fatal: Could not read from remote repository.
simple 17-Jul-2019 19:59:45
simple 17-Jul-2019 19:59:45 Please make sure you have the correct access rights
simple 17-Jul-2019 19:59:45 and the repository exists.

I have tried re-saving all relevant linked repositories in Bamboo (the main checked out repo and the submodule repo, both linked).

Have also tried manually adding the public key listed in the Linked repo under Advanced in Bitbucket but Bitbucket said it was already added to the repo.

It worked before the upgrade of Bamboo from 6.4 to 6.9.2.

Is there any steps one needs to take after upgrading to sync keys between Bamboo and Bitbucket that re-saving the Linked Repositories does not fulfill?

1 answer

0 votes
Anil Unnikrishnan February 13, 2020

Any updates on this issue?

Thomas February 24, 2020

We did a work-around by adding a Command task:

submodule update --init --recursive

With Environment variables

GIT_SSH_COMMAND='ssh -i /c/Certs/bamboo.key'

Where `bamboo.key` is a ssh-key manually added to a bamboo user in bitbucket.

Jason Templeman July 2, 2020

Has this been fixed as we're seeing something similar with our 7.0.3 install running Linux remote agents.  Source Code Checkout task fails for linked library with "Permission denied (publickey)".  Note we are currently migrating to building in a K8s cluster.

Running a Command task to perform just git clone of the repo also fails with "Host key verification failed"

As these steps fails we cannot run a Command task to perform a submodule update

Are you suggesting to modify the linked library to un-check submodules and then running the Source Code Checkout task followed by a Command task running git submodule update?  Seems to get past the initial clone without error but having to change all our linked repos is not an acceptable workaround.

Also not familiar with the env vars above.  /c/Certs appears to be a Windows system?  We are running on Linux.  Also are you saying that you enter the whole key on the command line?  

GIT_SSH_COMMAND='ssh -i /c/Certs/ssh-rsa aaaaaffdfpoiwoeiruweorbngfds...'

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events