If you need to add other users so they can decrypt and work with the files in your repository, the first thing you must do is import their GPG public key with the command: gpg -import KEY.txt
To unhide those files, issue the command: git-secret reveal How to add other users It is recommended that you add the git secret hide command to your pre-commit hook, otherwise you might miss changes. Once you've added all the necessary files, hide them with the command: git-secret hideĪt this point it is safe to commit your changes. If adding more than one file, separate them with a space. Where FILES is the name(s) of the file or files you want to add. Now you can add files to the secret repository with the command: git-secret add FILES Where EMAIL is the email address associated with your GPG key. Next add the email address associated with your new GPG keypair with the command: git-secret tell EMAIL Once you've initialized Git, rerun the git-secret init command.
If you've not already initialized a git repository, you'll be warned to do so with the command: git init The first thing you must do is initialize the git-secret repository with the command: git-secret init Once your GPG key is created, you're ready to start using git-secret.
If you don't have one on the server or desktop you are working on, create it with the command: gpg -full-generate-keyįirst answer the questions regarding the key creation and then, when prompted, enter your name and email address. In order to use git-secret, you must first have a GPG keypair. With the key added, install git-secret with the command: sudo apt-get update & sudo apt-get install git-secret How to create the GPG key Once that is taken care of, download the GPG key for the repository with the command: wget -qO - | sudo apt-key add.
You won't find this tool in the standard repository, so you first must add a third-party repo with the command: echo "deb git-secret main" | sudo tee -a /etc/apt/sources.list The first thing to be done is the installation of git-secret.