at your own risk
never commit plain text passwords to Git, even private ones - they can always be leaked without your knowing at some point
where appropriate, dont use git secret, instead use a secret vault as in AWS, Azure or something like Hashicorp vault or secured secrets in pipelines, again when appropriate, you know the drill
ideally linux, WSL or mac although Cygin and friends will also work in windows cmd like shells and no doubt PowerShell environments will now support the same but admittedly I have not tried to make this work for myself
you must have gpg
installed and set up with a private key
git
ofcourse must be installed
git clone https://github.com/sobolevn/git-secret.git git-secret
and see installation instructions to
make build
PREFIX="/usr/local" make install
within a git repo, initialise git secret
git secret init
add current gpg user for git secret to encrypt for
git secret tell -m
edit file hideme.txt
and add this to .gitignore
so it will not be commited to git
add hideme.txt to git secret
git secret add hideme.txt
encrypt the file
git secret hide
the plain text file can be removed and git can be used to store the encrypted file in the normal way
decrypt the file with
git secret reveal
then edit as required, then re-encrypt with
git secret hide
then remove the plain text file and so on ...