/srv/irclogs.ubuntu.com/2014/12/08/#bzr.txt

=== r0bby_ is now known as robbyoconnor
mark06how can I mirror bzr commits to a git repository automatically?10:54
mark06actually, I have a server with git repos that are mirrors of bzr branches10:55
mark06I want a cron or similar that will automatically pull from bzr then push to github10:56
mark06is there any existing solution for this, or do I need to write my own thing?10:56
mark06main problem for me is ssh key password, I want the process to be automated10:56
mgrandii have a bzr plugin that just does a dumb commit to git on the post_commit hook10:56
mark06how exactly "to git"10:57
mgrandicurrently bzr-git needs to be fixed to be used with bzr-1.6 to use the bzr dpush thing10:57
mark06my git mirrors of bzr branches use git-bzr-ng already  https://github.com/termie/git-bzr-ng10:57
fullermdI go the other way for stuff, and use git-bzr-ng (I think?) to mirror.10:57
mark06indeed I use it, but as I said I want to automate the mirroring10:58
mgrandithats probably better then what im doing10:58
fullermdWell, you just cron it...   what more do you need?10:59
mgrandiall i'm doing is exporting to a folder then calling 'git commit -m '<>'10:59
mark06fullermd: a working solution10:59
fullermdOh, well, I'd never thought of THAT   :p10:59
mgrandipost commit hooks aren't terribly hard to write10:59
fullermdWhat fails in it?10:59
mark06fullermd: it's not that simple, I'll show you the script I'm writing in case I don't find an existing solution10:59
mark06fullermd: http://vpaste.net/sMHhm11:00
mark06I could put this in cron, but as I said above, I can't11:00
mark06crond will get stuck reading ssh key password11:00
mgrandiseems like you just need to fix that11:01
fullermdEh.  If an automated process needs access to a key, don't passphrase the key.11:01
mgrandiand will have the same problem with bzr11:01
mgrandican you not have the agent remember the password? its different on every operating system...11:01
mark06so I need to create a separate ssh key just for this cron job, then add to both launchpad and github, right?11:02
mgrandiputty on windows asks for password at startup and then you don't need to remember it11:02
mgrandierr type it11:02
mark06the server is ubuntu11:02
mark06yes I use putty on windows for both git and bzr11:03
mark06if server reboots suddenly then mirror will stop working until I run ssh-agent again, if I would keep it running with cached key11:03
mark06so in sum, the separate ssh key is the way to go here?11:04
fullermdI'd say.  's just like passphrased SSL cert/keys; unless you want to manually intervene in any [re]start of the server, you just don't do it.11:05
mgrandior have ssh agent load the password from a file, if it can do that11:06
mark06's?11:06
fullermdThat would be pointless; if the passphrase is sitting around in the clear, it's no different than an unphrased key from a security perspective, so it just adds fragility and possible dangerous-illusion.11:07
fullermd"It's" is way too long to type, so I contractify the contraction   :p11:07
mark06yeah I'm worried about unprotected key, specially because it will give access to all my launchpad and github repos.... I wanted it to have access only to the repos I'm mirroring11:07
mark06ah wait, not for launchpad11:08
mark06I just pull from launchpad11:08
mgrandii dont think even github allows 'restricted' access for a ssh key11:08
mark06yeah this is why I'm worried11:10
mgrandiif it makes you feel any better this is just a problem with ssh, not necessarily any VCS =P11:10
mark06it's so easy for them to implement11:10
fullermdYou could always just use rsh instead; then you don't have to worry about passphrasing keys.11:11
mark06I don't care where the problem is11:11
* mark06 looks up rsh11:11
fullermd... well, that takes all the fun out of saying it...11:11
mark06grr tldr http://en.wikipedia.org/wiki/Restricted_shell11:12
fullermdNah, http://en.wikipedia.org/wiki/Remote_Shell11:12
mgrandiwell if you have a passphrased key, then its still protected by your local login password11:14
mgrandiif you set the permissions to be not world readable11:14
mgrandialthough that works for pass-less keys too11:14
fullermdVulnerable to root, or a root crack.  Also backups provide an attack vector.11:15
fullermdFortunately, that one can be closed by the simple expedient of not doing backups   :)11:16
fullermdWidely adopted security mechanism, that.11:16
mgrandiyeah, either way if they have local access you are screwed either way11:18
mgrandiand its 4 am, why am i even up11:19
fullermdWhy wouldn't you be?  Heck, the sun isn't even up yet.11:20
mgrandiwell the sun is stupid11:21
mgrandistupid sun11:21
mgrandiwhat have you ever done for me11:21
fullermdHey, it's done PLENTY for me!  I've had some nasty sunburns over the years...11:23
fullermdWait, maybe that's more "to" than "for".11:24
mgrandii live in a place where its sunny like 300+ days of the year11:24
mgrandiIM OVER THE SUN11:24
mgrandibut i need to get to bed, best of luck mark0611:25
mgrandipeace11:25

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!