Bypass cached repository when pushing

Hi!

I'm having issues with doing Git push for both tags and commits when using a cached repository setup in Bamboo.

The scenario:

We are using a child plan that builds our application. During the bild we generate files and create tags. Both pushing the commits and the tags seem to work (no errors), but never show up in the logs at the remote (Stash). Found this in the logs:

build	08-Nov-2013 12:51:13	version  DONE pushing commit
build	08-Nov-2013 12:51:13	tagging  #################################################################
build	08-Nov-2013 12:51:13	tagging  Starting tagging
build	08-Nov-2013 12:51:13	tagging  
build	08-Nov-2013 12:51:13	tagging  -*- EXECUTING: git tag -a -mAuto-Release-Build-b-feature-feature-DEV-10171-update-build-script-to-use-alternative-4-based-on-feature/DEV-10171-update-build-script-to-use-alternative b-feature-feature-DEV-10171-update-build-script-to-use-alternative-4
build	08-Nov-2013 12:51:13	tagging  
build	08-Nov-2013 12:51:13	tagging  DONE creating vcs tag b-feature-feature-DEV-10171-update-build-script-to-use-alternative-4
build	08-Nov-2013 12:51:13	tagging  
build	08-Nov-2013 12:51:13	tagging  -*- EXECUTING: git push --tags
build	08-Nov-2013 12:51:13	tagging  
error	08-Nov-2013 12:51:13	To file:///opt/atlassian/application-data/bamboo-agent/xml-data/build-dir/_git-repositories-cache/1c07087b9ce946f558f8dfc5679a2dbd3342378b
error	08-Nov-2013 12:51:13	 * [new tag]         b-feature-feature-DEV-10171-update-build-script-to-use-alternative-4 -> b-feature-feature-DEV-10171-update-build-script-to-use-alternative-4
build	08-Nov-2013 12:51:13	tagging  DONE pushing tag

The line with "To file://..." caught my eye. To me it looks like the push is done to the cache, and not to the actual remote.

So my question is this, is there a way to bypass/specify not to use the cache when pushing?

2 answers

We had what I think is a similar issue and the instructions in https://confluence.atlassian.com/display/BAMKB/Merging+and+pushing+to+remote+repository+fails did help us.

0 vote

Have you tried specifying repository url? as in: git push <options> [repositoryUrl]

See also: https://www.kernel.org/pub/software/scm/git/docs/git-push.html

You can get repository url from variable: ${bamboo.planRepository.<repositoryNumber>.repositoryUrl}

where repositoryNumber is position of the repo in plan's repository list. (you can omit this for default repository)

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,321 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