Page 1 of 1

Project Gamera gpg key

Posted: Thu Oct 23, 2014 6:51 am
by faris
I'm trying to use the pg-client.sh and pg-master.sh scripts to automate domain configuration for a couple of Project Gamera boxes.

Unfortunately I've fallen at the first hurdle, in that I can't find the pg.key

From the README
Step 5) Copy /usr/share/project-gamera/pg.key to each client system

So that's fine, I expect it isn't generated automatically for me and I need to do it manually.

But I need some help - I don't have a clue how to do so for this situation.

Is it just gpg --gen-key (with no password)? or what exactly?
And then what? I need to export it (with armour)?


I also notice this in pg-client.sh
# Do we have the gpg key?
gpg --list-key Project > /dev/null 2>&1 || NOKEY=1

This implies that I have to either change that line or use Project somewhere or other when creating/exporting the key?

Sorry to be a dunce.

Re: Project Gamera gpg key

Posted: Thu Oct 23, 2014 10:36 am
by scott
Right, so when you generate a key, you can enter the "real name". You can also ID a key based off of email address, keyID, etc. Real name ended up being less of a hassle.

Re: Project Gamera gpg key

Posted: Thu Oct 23, 2014 11:34 am
by scott
BTW if you have improvements here shoot us a pull request. Let me know if you need any help sorting that out, git can be a little wacky if you're used to svn or cvs

Re: Project Gamera gpg key

Posted: Fri Oct 24, 2014 9:17 am
by faris
I'll give it a go :-) Thanks.

Re: Project Gamera gpg key

Posted: Fri Oct 24, 2014 10:48 am
by faris
Scott,

Can you tell me why --homedir is being specified in pg-master.sh please?

Code: Select all

gpg --homedir $PGHOME/ --keyring pg.pub --secret-keyring pg.sec
What I mean is that in a typical install you'd have a ~/.gnupg with the keys and so on in there so no need to specify homedir, keyring etc.

Is the expectation that the cron job won't be run as root or is there some other thing going on?

Re: Project Gamera gpg key

Posted: Fri Oct 24, 2014 12:14 pm
by scott
It was probably as a backup in case the HOME variable wasnt defined. You can try it without it to see if it works OK. I think modern bash is pretty resilient toward that. That code was probably written on EL4 so its possible that at the time, it didn't work without it.