mirror of
https://github.com/AGWA/git-crypt.git
synced 2025-12-29 14:15:05 -08:00
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.
This commit is contained in:
8
key.cpp
8
key.cpp
@@ -36,6 +36,7 @@
|
||||
#include <fstream>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -146,6 +147,13 @@ bool Key_file::store_to_file (const char* key_file_name) const
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string Key_file::store_to_string () const
|
||||
{
|
||||
std::ostringstream ss;
|
||||
store(ss);
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
void Key_file::generate ()
|
||||
{
|
||||
entries[is_empty() ? 0 : latest() + 1].generate();
|
||||
|
||||
Reference in New Issue
Block a user