We have a build plan configured against an internal git repository where it uses periodic repository polling for changes. When the build executes the first time after the Bamboo daemon starts, it hangs on checkout. We have determined that this is because the git ssh connection does not trust the host fingerprint. In order to fix it we have to open a terminal and run the git command using the information in the builds log (see below). It looks like it is abstracting the actual repository away from the build execution.
Is there a way to force bamboo to use a single port for ssh instead of it randomly picking one each and every time the bamboo daemon is started? Or is it possible to somehow configure bamboo to not use ssh for its internal polling? Or is it possible to configure the ssh task to auto accept the fingerprint?
Here is what shows in the log when we Stop the build and forcefully kill the build process. We then execute "ssh email@example.com:1124" to allow us to accept the host fingerprint.
Executing Task 'Checkout Default Repository(3)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout.
I think you're hitting a bug in Bamboo. https://jira.atlassian.com/browse/BAM-11096
The desired Bamboo behavior is that it manages to 'invisibly' replace the known fingerprints in-fly so no user will have to accept the fingerprints manually. Seems to me it doesn't work on Windows machines. At least not on every.
Which ssh client do your git.exe use? I assume you are using http://code.google.com/p/msysgit/ as a git implementation on windows... how had you configured ssh for it?
That looks to be the issue. We use msysgit and all of the goodies that come with it. If you look at the task manager you can see that git.exe kicked off ssh.exe to grab the updated code. I noticed that it only seems ot happen when Polling Repository for Changes. If we only do manual build strategy the issue doesn't happen, probably because it connects directly to the ssh server instead of through a custom ssh connection. It would be nice if when setting up the build plan's git ssh connectivity that it attempted to access the server immediately and then let you accept the host fingerprint from there.
The msysgit git install folder contains a .ssh\known_hosts file that shows the fingerprint. It would be pretty easy for bamboo to automatically add it to that file.
[127.0.0.1]:4657 ssh-rsa AAAAB3NzaC1
[127.0.0.1]:1124 ssh-rsa AAAAB3NzaC1
bq. "If we only do manual build strategy the issue doesn't happen"
That's weird, because (regarding to this issue) there are no differences in "Polling Repository" and "Manual Build" strategies - git commands run by Bamboo would be the same in both scenarios. Can you confirm that it is the same plan failing when run with "polling repository" strategy and succesful when its strategy is set to "Manual" and you run the build manually?
I confirm there exist a bug in Bamboo (BAM-11096) and we are trying to fix it before Bamboo 4.0. However, if you need to workaround the problem sooner you should manually edit your .ssh\known_hosts file (in msysgit git install directory I presume) and add:
127.0.0.1 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC699HzXHwr1H6OJeVlRo7h4r+3PYd0wNkqzl6EUAeU2iZjqFqQL2ZiNVqs2JrpTNduipXBNk9rhQIWajQZG9ZJG/OPxe+NOkbWQVevrcELsw5N2wxcJOWz+ey1tFv3VCtNCLUGgF7yIg0kWWVQ+HvAzLoMbiHs0haVmEjnLherSw==
That way you won't have to open terminal and run the git commands manually each time Bamboo starts its ssh deamon.
For those not specifically running into ssh errors, msysgit needed some help after being installed.
Hey team! I'm Cameron Deatsch, Head of Server at Atlassian. At our European Summit just a few weeks ago, I spoke about the latest regarding our Server and Data center products and o...
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!
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