How to clearsign Code of Conduct with key other than the default.

Asked by laptoplinux

I am trying to sign the Ubuntu Code of Conduct but have the following problem. When I clearsign as outlined by Launchpad...

In a terminal, run the command:
gpg --clearsign UbuntuCodeOfConduct-1.0.1.txt
(or whatever filename you gave to the code). This will create a file with a name like UbuntuCodeOfConduct-1.0.1.txt.asc.

it defaults to a key with which I DON'T want to sign. I have multiple keys on my box. I can not figure out how to clearsign with the SPECIFIC key I created for Launchpad at the command line and I cannot find any options to do so under any of the GUI's provided on Hardy.

Suggestions?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnupg Edit question
Assignee:
No assignee Edit question
Solved by:
laptoplinux
Solved:
Last query:
Last reply:
Revision history for this message
Steven Rose (steveydoteu) said :
#1

In a terminal type the following.

man gpg

Read away, you might learn a thing or two. :)

Revision history for this message
laptoplinux (laptoplinux) said :
#2

I did read the man pages before posting and I read them again after your reply. There isn't anything that jumps out at me except for the --default-key option.

When I use that it just returns a message saying "start typing message" with a prompt waiting.

Although I appreciate and understand comments that suggest reading Man pages sometimes we noobs do read them. It would be nice if the members with more experience said "Yes. This is how you do it...." "but it would be good if you would read the man pages". That way we have a SOLUTION to our problem and a method by which to solve it ourselves later on.

As of now I am unable to clearsign with the key of my choice. Admittedly through my own ignorance but nevertheless the problem still exists.

I'll skip the CoC for now I guess. Thanks.

Revision history for this message
Steven Rose (steveydoteu) said :
#3

Personally I do not know the exact answer myself, my immediate suggestion was to read the man pages, as it may have contained helpful info, at the time however, I was unable to read through it myself. apologies.

Revision history for this message
laptoplinux (laptoplinux) said :
#4

Steven,

No apology is necessary and I am sorry if my reply came off the wrong way.

If I come across a solution I will post it here but right now it isn't at the top of the list of my Ubuntu "problems".

Thanks.

Revision history for this message
laptoplinux (laptoplinux) said :
#5

Seems that the default-key option wasn't for the command line but to be used in the config file...I think. If a default key isn't defined it will use the first key in your key chain...I think.

Anyway...regardless it is working for me now defining the default-key in the GPG config file.

Revision history for this message
Bernhard Essl (b23) said :
#6

A bit outdated, but here is my solution:

1.) Get your key-ID:

gpg --list-keys <email address hidden>

It's the hexstring in the first line after the slash (pub 1024D/A00DF3G7 2008-10-19)

2.) Sign with your key-ID:

gpg --default-key A00DF3G7 --clearsign UbuntuCodeofConduct-1.0.1.txt

Revision history for this message
Clovis Peruchi Scotti (roboscotti) said :
#7

Thanx Bernd!