remove git secrets from Ubuntu

1.6k Views Asked by At

I have added git secrets to ubuntu(16.04 LTS) and it was working fine until I was executing these commands,

git secrets --register-aws
git secrets --install ~/.git-templates/git-secrets
git config --global init.templateDir ~/.git-templates/git-secrets

I have removed these files,

~/.git-templates/git-secrets
/usr/bin/git-secrets

from my environment, but still it seems not working fine.

git secrets --scan , gives nothing

How do I remove git-secrets permanently from my PC and re-install or solve this issue.

1

There are 1 best solutions below

0
On

Currently we need to do this manually.

  1. Delete secrets from .git/config for all local repositories.

  2. Delete secrets from .gitconfig.

  3. Remove commit-msg, pre-commit and prepare-commit-msg hooks from all git repositories.

  4. Change/remove git template so that it does not configure these hooks for newer repos.

  5. Uninstall binary. Following are the multiple places you can look in the Linux based machine.

    i. By default all the git core command scripts are available in /usr/lib/git-core/ directory.

    ii. Apart from that, you can check in /usr/bin/ and /usr/local/bin/ directories as well.

    iii. If you are still NOT able to find the binary, then type which git-secrets to identify the place where actually git-secrets is installed.

There is an issue created for the same in GitHub. You can check the progress in there as well.