User1: how can I mirror bzr commits to a git repository automatically?
User1: actually, I have a server with git repos that are mirrors of bzr branches
User1: I want a cron or similar that will automatically pull from bzr then push to github
User1: is there any existing solution for this, or do I need to write my own thing?
User1: main problem for me is ssh key password, I want the process to be automated
User2: i have a bzr plugin that just does a dumb commit to git on the post_commit hook
User1: how exactly "to git"
User2: currently bzr-git needs to be fixed to be used with bzr-1.6 to use the bzr dpush thing
User1: my git mirrors of bzr branches use git-bzr-ng already  https://github.com/termie/git-bzr-ng
User3: I go the other way for stuff, and use git-bzr-ng (I think?) to mirror.
User1: indeed I use it, but as I said I want to automate the mirroring
User2: thats probably better then what im doing
User3: Well, you just cron it...   what more do you need?
User2: all i'm doing is exporting to a folder then calling 'git commit -m '<>'
User1: User3 a working solution
User3: Oh, well, I'd never thought of THAT   :p
User2: post commit hooks aren't terribly hard to write
User3: What fails in it?
User1: User3 it's not that simple, I'll show you the script I'm writing in case I don't find an existing solution
User1: User3 http://vpaste.net/sMHhm
User1: I could put this in cron, but as I said above, I can't
User1: crond will get stuck reading ssh key password
User2: seems like you just need to fix that
User3: Eh.  If an automated process needs access to a key, don't passphrase the key.
User2: and will have the same problem with bzr
User2: can you not have the agent remember the password? its different on every operating system...
User1: so I need to create a separate ssh key just for this cron job, then add to both launchpad and github, right?
User2: putty on windows asks for password at startup and then you don't need to remember it
User2: err type it
User1: the server is ubuntu
User1: yes I use putty on windows for both git and bzr
User1: if server reboots suddenly then mirror will stop working until I run ssh-agent again, if I would keep it running with cached key
User1: so in sum, the separate ssh key is the way to go here?
User3: I'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.
User2: or have ssh agent load the password from a file, if it can do that
User1: 's?
User3: That 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.
User3: "It's" is way too long to type, so I contractify the contraction   :p
User1: yeah 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 mirroring
User1: ah wait, not for launchpad
User1: I just pull from launchpad
User2: i dont think even github allows 'restricted' access for a ssh key
User1: yeah this is why I'm worried
User2: if it makes you feel any better this is just a problem with ssh, not necessarily any VCS =P
User1: it's so easy for them to implement
User3: You could always just use rsh instead; then you don't have to worry about passphrasing keys.
User1: I don't care where the problem is
 * mark06 looks up rsh
User3: ... well, that takes all the fun out of saying it...
User1: grr tldr http://en.wikipedia.org/wiki/Restricted_shell
User3: Nah, http://en.wikipedia.org/wiki/Remote_Shell
User2: well if you have a passphrased key, then its still protected by your local login password
User2: if you set the permissions to be not world readable
User2: although that works for pass-less keys too
User3: Vulnerable to root, or a root crack.  Also backups provide an attack vector.
User3: Fortunately, that one can be closed by the simple expedient of not doing backups   :)
User3: Widely adopted security mechanism, that.
User2: yeah, either way if they have local access you are screwed either way
User2: and its 4 am, why am i even up
User3: Why wouldn't you be?  Heck, the sun isn't even up yet.
User2: well the sun is stupid
User2: stupid sun
User2: what have you ever done for me
User3: Hey, it's done PLENTY for me!  I've had some nasty sunburns over the years...
User3: Wait, maybe that's more "to" than "for".
User2: i live in a place where its sunny like 300+ days of the year
User2: IM OVER THE SUN
User2: but i need to get to bed, best of luck mark06
User2: peace
bzr
Ubuntu IRC