git-secure-export

Experimental tooling for encrypting the git-fast-export(1) output

git clone https://git.8pit.net/git-secure-export.git

 1# git-secure-export contrib
 2
 3Scripts for using `git-secure-export` as a git remote-helper.
 4
 5## Architecture
 6
 7The client-side git remote helper (`git-remote-secure`) connects using
 8`ssh(1)` to the git server and spawns the `git-secure-receive` command
 9on this server. Afterwards, remote helper commands are piped to it. Data
10send to the server is encrypted using `git-secure-export`, data received
11from the server is decrypted using `git-secure-import`.
12
13## Limitations
14
15Every git push effectively has `--force`.
16
17## Installation
18
19This setup requires install one script on the server and the client.
20
21### Server
22
23Copy `git-secure-receive` to your `$PATH`, make sure you can invoke it
24from `ssh(1)` as `ssh <host> git-secure-receive`.
25
26### Client
27
28Copy `git-remote-secure` to your `$PATH`. Start using
29`git-remote-secure` for your repository by adding a secure remote using:
30
31	git remote add secure://<git server>:<path to git repo on server>
32
33Afterwards, you can push/pull your repository as you would normally
34while data is transparently encrypted/decrypted by the remote helper.
35You can verify that the plaintext is not stored on the server by cloning
36your encrypted repository over ssh without using `git-remote-secure`.
37
38## Usage
39
40Example initialization of a new repository on both client and server:
41
42	$ mkdir testrepo && cd testrepo
43	$ git init
44	Initialized empty Git repository in /tmp/testrepo
45	$ git secure-init
46	Initialized symmetric key in .git/git-secure-key
47	$ ssh example.org 'mkdir -p testrepo && git -C testrepo init'
48	Initialized empty Git repository in /home/user/testrepo/.git/
49	$ git remote add secure://example.org:repos/testrepo
50
51Afterwards files can be committed and pushed as usual.