Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Permission denied (publickey) submodule after upgrade


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

Any updates on this issue?

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.

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
Community showcase
Published in Bamboo

Bamboo Data Center 8.1 is now available

G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...

213 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you