Search code examples
gitgerritgit-tower

Integrating Git-Tower and Gerrit


I am attempting to use Git-Tower with Gerrit with and am having difficulty having Git-Tower set and recognise the proper push refspec.

In our workflow we have two remotes: origin, pointed at a github repository; and review, pointed at our Gerrit code review machine. I have verified that pushing to Gerrit works from the command line with:

git push review HEAD:refs/for/develop

In Git-Tower I configure the push refspec to refs/heads/develop:refs/for/develop and have verified in the git config file that this has been set. However, when I try to push from within Git-Tower to review/develop Git-Tower attempts to push to refs/heads/develop rather than refs/for/develop, and since I am not an administrator it fails (as it should).

How should I configure either Git itself or Git-Tower specifically so I can use this workflow from within Git-Tower?


Solution

  • After configuring the Push Refspec (as you already did), you shouldn't need to make any more customizations: when clicking "Push", you can leave the setting to "origin/"!

    If this doesn't work out, you can get in touch with our support crew via support[at]git-tower.com.