Branches are not showing up in Stash when using JGit Flow Maven Plugin
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
When using JGit Flow Maven Plugin, it does not propagate the changes/tags/branches to the master Git repo in Stash. Bamboo checks out a cache of the Stash repository into "_git-repositories-cache", when checking the remote using SourceTree, it indicates that the remote is: origin file://nothing rather than the info for Stash. As a result, the branching/tagging that is done by the JGitFlow plugin is showing in the _get-repositories-cache copy, but not making its way back to Stash.
Cause
Bamboo uses an internal proxy as the origin by default and configures a non-working origin URL.
Workaround
To get around this issue, you need to configure the jgit-flow plugin in your pom.xml with the following. This will tell the plugin to always use your default origin url regardless of what Bamboo puts in there.
1
2
<defaultOriginUrl>your-actual-url</defaultOriginUrl>
<alwaysUpdateOrigin>true</alwaysUpdateOrigin>
Was this helpful?