Keychain access when starting Bamboo at boot (OSX)

I've run into a very bizarre issue:

We recently changed one of our OSX agents to start bamboo at boot, following the instructions here:

This seems to work just fine and launches the agent online when the system boots.

The problem is, when I try and do a build from the command line, Xcode cannot find my certificates that are in my keychain. I absolutely know they are there because I can build find from the GUI and even through SSH. I even run security unlock on the keychain (which reports success) and yet Xcode still can't find the certs/keys.

If we *don't* launch Bamboo at boot, and instead ssh in and launch bamboo as the build-user, i.e. ./ start, this problem goes away and everything builds just fine.

In other words, there seems to be a difference between starting bamboo at boot and starting bamboo through ssh manually. Has anyone run into this? Is this a known issue? I've tried to look around, and apologies if I've missed something and just need to RTFM.

EDIT: by "starting bamboo" and "launching bamboo" I mean starting the agent -- Bamboo itself is running just fine :)

4 answers

1 accepted

What I found out is when setting up the bamboo server not using the LaunchDaemon but the LaunchAgent it is using the correct user. Downside is that you need to login to be able to start the service, but that can be automated as well. Then the keychain can stay the same.

Bamboo is likely not running as your user now, it's running as a system user. Keychains are typically user specific, not machine specific, so you'll run into all sorts of problems.

There are a few ways to deal with this, but the easiest is just to copy your certificates and signing profiles from your keychain to the system keychain in Keychain Access.


I run in exactly the same issue, did you find a solution for this?





Hi Philip! 

Unfortunately I have not found a solution. Since the machines are not rebooted that often, I've just continued to use ssh as the mechanism to bring the agent back online (when we do reboot). 

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
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,068 views 0 5
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot