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
Accepted answer

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
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

73 views 3 3
Join discussion

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