Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: uninstall #95

Closed
kalexmills opened this issue Nov 26, 2018 · 9 comments
Closed

feature request: uninstall #95

kalexmills opened this issue Nov 26, 2018 · 9 comments

Comments

@kalexmills
Copy link

Seems there is no way to undo all the stuff that this tool does to a repository.

Looks like I will have to do it manually. :-(

@kalexmills
Copy link
Author

kalexmills commented Nov 27, 2018

Specifically, I am getting the below error anytime I commit to a repository, even after I brew uninstall, and delete / re-clone the repository.

> git commit -a
git: 'secrets' is not a git command. See 'git --help'.

@kalexmills
Copy link
Author

Looks like to resolve this, you can just do rm -rf .git/hooks/*

But this removes ALL githooks. It should only be used by the desperate or reckless, and it does not resolve the core problem this tool has.

@microbuilder
Copy link

I came here looking for the same thing, and you can manually disable this by editing the following three files, or deleting them if there is only the one entry in them:

  • .git/hooks/commit-msg
  • .git/hooks/pre-commit
  • .git/hooks/prepare-commit-msg

@literakl
Copy link

This works for git hooks. But I cannot find, where a pattern configuration is stored:

git secrets --scan-history
cat: 'C:/bin/Git/path/to/secret/file/patterns': No such file or directory

@craigboman
Copy link

craigboman commented Feb 20, 2020

Although no git secrets -r command exists, go into your local top level git repo directory and vi ~/.git/config. In config you should see your git secrets near the bottom blocked together under [secrets]. Scroll down to the desired row and type d to delete that secret row, then escape saving your changes. If you have stored those git secrets globally they may be in a different directory outside of the local repo, but similarly in a .git/config file.

@azazi-sa
Copy link

+1 to a clean uninstall process.

Current manual process requires you to:

  • delete secrets from .git/config for all local repositories
  • delete secrets from .gitconfig
  • remove commit-msg, pre-commit and prepare-commit-msg hooks from all git repositories
  • change/remove git template so that it does not configure these hooks for newer repos.
  • uninstall binary

This is too much manual work.

@kcsurapaneni
Copy link

on top of, what @azazi-sa mentioned

You have to figure out where the binary is actually installed.
Following are the multiple places you can look in the Linux based machine.

  • By default all the git core command scripts are available in /usr/lib/git-core/ directory.
  • Apart from that, you can check in /usr/bin/ and /usr/local/bin/ directories as well.
  • 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.

@vasanthaneppali
Copy link

This works for git hooks. But I cannot find, where a pattern configuration is stored:

git secrets --scan-history cat: 'C:/bin/Git/path/to/secret/file/patterns': No such f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants