Remote build agent connecting to bitbucket behind a proxy


I'm trying to setup a Bamboo remote agent to grab source code from a Bitbucket Git repository. The agent runs on Windows behind a proxy. I've setup the repository in my build plan and setup the proxy in Git global settings. Manually cloning the repo from the build agent server works fine, but when triggering a build I get the following:

java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Cannot fetch branch '(unresolved) ' from '' to source directory 'C:\Services\BambooRemoteAgent\RemoteAgentHome\xml-data\build-dir\DOM-DOMCB-JOB1'. cannot open git-upload-pack
at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(
at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(
at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(
at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(
at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(
at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(
at Source)
Caused by: com.atlassian.bamboo.repository.RepositoryException: Cannot fetch branch '(unresolved) ' from '' to source directory 'C:\Services\BambooRemoteAgent\RemoteAgentHome\xml-data\build-dir\DOM-DOMCB-JOB1'. cannot open git-upload-pack
at com.atlassian.bamboo.plugins.git.GitOperationHelper.fetch(
at com.atlassian.bamboo.plugins.git.GitOperationHelper.fetch(
at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(
at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(
at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(
at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(
at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$
at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$
at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(
... 11 more
Caused by: org.shaded.eclipse.jgit.errors.TransportException: cannot open git-upload-pack
at org.shaded.eclipse.jgit.transport.TransportHttp.connect(
at org.shaded.eclipse.jgit.transport.TransportHttp.openFetch(
at com.atlassian.bamboo.plugins.git.GitOperationHelper.withFetchConnection(
at com.atlassian.bamboo.plugins.git.GitOperationHelper$2.doWithTransport(
at com.atlassian.bamboo.plugins.git.GitOperationHelper$2.doWithTransport(
at com.atlassian.bamboo.plugins.git.GitOperationHelper.withTransport(
at com.atlassian.bamboo.plugins.git.GitOperationHelper.fetch(
... 19 more
Caused by: Connection time out:
at org.shaded.eclipse.jgit.util.HttpSupport.response(
at org.shaded.eclipse.jgit.transport.TransportHttp.connect(
... 25 more

Could someone please advise on how to get this working?

Thanks for your help!

1 answer

1 accepted

1 vote

Have you tried specifying the proxy address via java properties? (

Thanks for your reply.

I've now tried to add this to my wrapper.conf file:”localhost|mybambooserverurl”

I've restarted the service after the change, but it doesn't change anything and I'm still getting the exact same error. Is that what I was supposed to do?

The thing that puzzles me is that in the build log it looks like "something" (not sure if it's the main server, the build agent or git) is able to connect to my repository as it is getting the revision number out corretly. I can see this in the logs and it's matching my bitbucket revision number:

"Updating source code to revision: 41a4c75eb9e0d92823008c0b56572f649dbbbaff"

But just after that I'm getting this:

"Creating local git repository in 'C:\Services\BambooRemoteAgent\xml-data\build-dir\DOM-DOMCB-JOB1\.git'.

Cannot fetch branch '(unresolved) master' from '' to source directory 'C:\Services\BambooRemoteAgent\xml-data\build-dir\DOM-DOMCB-JOB1'. cannot open git-upload-pack"

And I forgot to mention earlier that I already have setup the proxy details in the Git global config and I'm using "Git For Windows" and not msysgit. I'm not sure if this has anything to do with the problem.

Any idea?

Thanks for your help

ok, I figured it out. I didn't realise you have to specify different settings for HTTPS. It all works fine now.

Thanks for your help!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
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,490 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