Commit Graph

4 Commits

Author SHA1 Message Date
Andrew Ayer
3104508adf Add --trusted option to gpg-add-user
If this option is specified, then the GPG users are added even
if their keys are not trusted by GPG.

In addition, if a full fingerprint, prefixed by 0x, is specified,
it is assumed to be trusted, regardless of its trust level in the
GPG trustdb.
2015-03-31 20:24:13 -07:00
Andrew Ayer
ad71c7ffae FIx GPG key lookup with with-fingerprint enabled in gpg.conf
When the with-fingerprint option is enabled, the gpg command invoked by
git-crypt to look up a GPG user ID returns a fingerprint for both primary
keys and sub-keys.  Previously, this misled git-crypt into thinking that
the user ID matched more than one public key.  Now, git-crypt ignores
fingerprints for sub-keys.
2015-03-31 19:41:19 -07:00
Andrew Ayer
6e43b2a1cd New exec_command() that takes command as array instead of string
This abstracts away the details of argument quoting, which differs
between Unix and Windows.

Also replace all uses of the system() library call with exec_command().
Although system() exists on Windows, it executes the command via cmd.exe,
which has ridiculous escaping rules.
2014-06-12 21:23:04 -07:00
Andrew Ayer
7687d11219 Initial GPG support
Run 'git-crypt add-collab KEYID' to authorize the holder of the given
GPG secret key to access the encrypted files.  The secret git-crypt key
will be encrypted with the corresponding GPG public key and stored in the
root of the Git repository under .git-crypt/keys.

After cloning a repo with encrypted files, run 'git-crypt unlock'
(with no arguments) to use a secret key in your GPG keyring to unlock
the repository.

Multiple collaborators are supported, however commands to list the
collaborators ('git-crypt ls-collabs') and to remove a collaborator
('git-crypt rm-collab') are not yet supported.
2014-03-28 14:02:25 -07:00