Problems with Bamboo, Git and submodules

Hi,

I setup a checkout task to pull one bitbucket project with submodules in Bamboo. I checked the submodules option but when it start to pull the submodules I get an error of permissin denied.

simple	11-Feb-2013 17:44:31	Cleaned source directory '/home/bamboo/bamboo-agent-home/xml-data/build-dir/STAGE-ADMIN-JOB1'...
simple	11-Feb-2013 17:44:31	Creating local git repository in '/home/bamboo/bamboo-agent-home/xml-data/build-dir/STAGE-ADMIN-JOB1/.git'.
simple	11-Feb-2013 17:44:31	Initialized empty Git repository in /home/bamboo/bamboo-agent-home/xml-data/build-dir/STAGE-ADMIN-JOB1/.git/
simple	11-Feb-2013 17:44:31	Fetching 'refs/heads/*' from 'https://bitbucket.org/mashon/dabble-all'.
simple	11-Feb-2013 17:44:32	From https://bitbucket.org/mashon/dabble-all
simple	11-Feb-2013 17:44:32	 * [new branch]      master     -> master
simple	11-Feb-2013 17:44:32	 * [new tag]         TEST.01.RC -> TEST.01.RC
simple	11-Feb-2013 17:44:32	Fetching to source directory '/home/bamboo/bamboo-agent-home/xml-data/build-dir/STAGE-ADMIN-JOB1' completed, proceeding with checkout...
simple	11-Feb-2013 17:44:32	Checking out revision 1be548fc20d6e222cab235ee53ca7301b8ac502f.
simple	11-Feb-2013 17:44:32	Already on 'master'
simple	11-Feb-2013 17:44:33	Submodule 'dabble-admin' (git@bitbucket.org:mashon/dabble-admin.git) registered for path 'dabble-admin'
simple	11-Feb-2013 17:44:33	Submodule 'dabble-core' (git@bitbucket.org:mashon/dabble-core.git) registered for path 'dabble-core'
simple	11-Feb-2013 17:44:33	Cloning into dabble-admin...
simple	11-Feb-2013 17:44:33	Warning: Permanently added 'bitbucket.org,207.223.240.181' (RSA) to the list of known hosts.
simple	11-Feb-2013 17:44:33	Permission denied (publickey).
simple	11-Feb-2013 17:44:33	fatal: The remote end hung up unexpectedly
simple	11-Feb-2013 17:44:33	Clone of 'git@bitbucket.org:mashon/dabble-admin.git' into submodule path 'dabble-admin' failed

Why it has the right permissions to fetch the main project but not the submodules? (All of them are in bitbucket same account)

Full log details:

https://gist.github.com/pablomolnar/4759525/raw/9e61e8b05adc69612664666299af54578c8e0cbc/gistfile1.txt

Thanks!

2 answers

1 accepted

4 votes

When handling submodules, Git does not ask Bamboo for the private key and just uses whatever is available in ~/bamboo/.ssh/ . Try adding your private key there.

How do you add files to ~/bamboo/.ssh?

What is the name of the file need to be?

How do you specify this file for the git authentication?

Will this work with bitbucket? (https://or ssh:// ? which?)

Do you mean to put this on the Elastic EC2 instance, then create a new 'image'?

What if I have a lot of changes in the "Capabilities" for the image? Do I need to redo them all over again?

It doesn't work with https protocols and private bitbucket repositories. Main repository which is being pulled from bitbucket via https: and username\password is working fine. Submodule which requires same authentication credentials - failing with fatal: Authentication failed for 'https://bitbucket.org/<teamname>/logging.git/'; Is there any workaround for this bug ?

How do you add files to ~/bamboo/.ssh?

What is the name of the file need to be?

How do you specify this file for the git authentication?

Will this work with bitbucket?

Do you mean to put this on the Elastic EC2 instance, then create a new 'image'?

What if I have a lot of changes in the "Capabilities" for the image? Do I need to redo them all over again?

Suggest an answer

Log in or Sign up to answer
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
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,810 views 0 6
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