enc-code documentation¶
Base command enc
enc command is a wrapper around your regular version control system (git, svn, mercurial etc.).
This command enables encryption and scrambling of repository files, commit messages, author info and commit date-time. The code stays decrypted in your local but is pushed in encrypted state in the remote repo. An enc repo organises code into:
working tree stage: the stage where your code stays pure, unencrypted and/or unscrambled. This is the stage where user is supposed to make changes and perform usual git operations by using the ‘enc’ command instead of the ‘git’ command. Users can set a trusted repository location to push this pure code into, this is not required though.
process stage: the stage where everything in the code is processed, encrypted and/or scrambled. This stage is configured so that processed code can be pushed to the remote untrusted repository.
> Note: enc command needs bash emulator to run on windows, e.g. git-bash. This requirement is almost always > satisfied by git on windows.
> Note: The Majority of git commands are supported
Examples:¶
Repo initialisation flow:¶
Create and move into the working tree:
mkdir -p repo-enc-root/working-tree
cd repo-enc-root/working-tree
Initialise a repository:
enc init -s 0 -k ../.some-key-file ../.process-stage
Explanation:
-s or seed decides the config encryption strategy. Takes non-negative integer as a value.
-k or key-file to provide a key-file which enables encryption-scrambling and/or decryption/descrambling.
../.process-stage to give address to a non-existing process-stage.
Make initial commit:
enc commit -m "initial commit"
Create a file with come content
cat<<EOF_FILE_LINE > my-new-file
Here is some
new content for my file
and this `cat` command can be stopped
by giving the
EOF_FILE_LINE
Check the status of repo
enc status
Add the newly created file to enable tracking
enc add my-new-file
Commit the changes:
enc commit -m "my-new-file added."
Repo Clone flow:¶
Create and move into the working tree:
mkdir -p repo-enc-root/working-tree
cd repo-enc-root/working-tree
Clone a repository:
enc clone -s 0 -k ../.some-key-file ../.process-stage
Explanation:
-s or seed decides the config encryption strategy. Takes non-negative integer as a value.
-k or key-file to provide a key-file which enables encryption-scrambling and/or decryption/descrambling.
../.process-stage to give address to a non-existing process-stage.
Create a file with come content
cat<<EOF_FILE_LINE > my-new-file
Here is some
new content for my file
and this `cat` command can be stopped
by giving the
EOF_FILE_LINE
Check the status of repo
enc status
Add the newly created file to enable tracking
enc add my-new-file
Commit the changes:
enc commit -m "my-new-file added."
Push to remote
enc push
Plumbing subcommands:
Configuration files: