Setup DVCS Force Sync as a Service

Thomas Scanlon May 25, 2012

I have jira setup on a server inside our firewall and we are linking to several private github repos. Force sync works but nothing happens automatically. My guess is we don't have the jira server available from github and truthfully we don't really want it available from the outside.

So ideally I'd like to cron the running of the sync to happen periodically. My guess is I'd do this with a "service" and a jelly script.

Or if anyone has information on how to open up the jira server to callbacks from github securely. I'm kinda familiar with portforwarding and 1:1 nats but I don't know enough about jira or github to start locking these down.

edit: tcpdump shows the force sync hitting github.com.https and there's a dns record for https.github.com so perhaps portforwarding could be alittle more secure

4 answers

0 votes
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2012

Doing a force sync is probably not a good idea since it updates everything each time it runs. This could force Jira to be logically offline when the re-index is done.

I would have to guess you did not setup your private githubs with the service to push out changes as defined in the DVCS connector documentation.

So can you add code to your github or not? If you can, then I would try to use an ssh or https connection between Jira and your private githubs.

http://blog.codeslower.com/2008/8/Using-PuTTY-and-SSL-to-securely-access-GitHub-repositories-via-SSH

Another idea

Maybe you could also setup a shadow github for each your repositories behind your firewall. You can then install DVCS github service there. You can then create a small background script that just updates your shadow respository through cron every 5 to 10 minutes. I am hoping the DVCS connector github software would then see the update and push out the changes to the DVCS Jira Service.

Thomas Scanlon June 1, 2012

Is the DVCS connector periodically polling Github for changes (aka jira initiates the connection) or is github trying to push changes back when specific hooks trigger to jira and the DVCS connector interprets commit messages (aka github initiating the connection)?

regarding the codeslower link, we've been able to use github just fine as our code repository, nothing is mucking with outbound ssh connections to github. Are you suggesting that having that open tunnel would allow the DVCS connector to open/receive connections from github?

re: another idea
WOuldn't I need to worry about the oauth stuff pointed at a regular git repo?

Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2012

The github DVCS connector code pushes out changes on specific hook triggers to Jira and the github initiates the connection to Jira. It is not a polling mechanism as I understand it.

Yes, I was looking at the ssh connection(codeslower) as a way to initiate a connection from github back to Jira. That is required to take full advantage the DVCS connector plugin features. Yes, I was hoping an ssh tunnel from github to Jira may be allowed since it is secured. It would be similar to creating an ssh from your home to your offfice. It something you need to find out if that is possible.

The shadow github concept would have all the same setup issues as your local github. The only difference would be DVCS connector code would be installed behind your firewall. In this case, you be polling your remote github to bring in your changes which we already know works for you. The shadow github would only be used by Jira. The user's oauth used in this case could have restricted access since it only needs to be able update and read logs.

0 votes
Thomas Scanlon May 31, 2012

@Norman yes we are using DVCS version .26

0 votes
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 31, 2012
0 votes
Daniel Bergholm May 31, 2012

We have exactly the same situation and problem.

Suggest an answer

Log in or Sign up to answer