Execute Git Commands from Bamboo Hangs

I have the following script. It runs fine locally.  I am using ssh not https and I have set up my repo as using ssh on Bamboo, loading the same private key file I am using with my system git (I also tried using the ppk file source tree uses). As soon as I run from bamboo the script is called but the push hangs; nothing happens. I had a git fetch in my script before and that hangs too. Any thoughts? 

 

@echo off
echo Starting Git Merge
set currentBranch=
cd /d %USERPROFILE%\bamboo-home\xml-data\build-dir\TEST-TP3-JOB1\Heart Test Labs
set sshString=git@bitbucket.org:<company>/<project>.git
git remote set-url origin %sshString%
git checkout master
git status
git checkout release/v2.0.0.0
git merge master
echo merge master finished
echo starting push
git push origin release/v2.0.0.0:release/v2.0.0.0
echo push finished
exit %ERRORLEVEL%

2 answers

Check if there is a ssh process waiting to enter a password.

Gregory -

I'm assuming you're running this as a Bamboo script task.  So have you defined an build agent for this to run as?

Since there's no way to set that under the script task, one option is to create a prior task (some arbitrary echo line) that specifies the agent.

Your assumption is correct. Also, I will have to check about the Build Agent as I am not in front of that computer right now.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

678 views 0 4
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