1

My employer is switching to using GIT from SVN, and I am trying to work out the kinks before everyone is switched over.

Right now I have set up a server to store centralized --blank GIT repos. We will be accessing it through https, with certain people only allowed to access certain repos. The constant prompting for usernames and passwords is quite annoying, especially when trying to get people to switch from TortoiseSVN which remembers credentials automatically.

I have found that you can use any of the following to remember credentials:

git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600'
git config --global credential.helper store

The first and second work, but at best you would have to retype your credentials every time the computer is turned off.

Using 'store', the passwords are saved plain text in the filesystem. You can tell GIT to forget these credentials with:

git config -- global --unset credential.helper

but that doesn't delete the file ~/.git-credentials, which will stick around with your password in it plain text.

Is there any way to have GIT delete this file?

Basically, if I don't want to type credentials and use 'store', but later decide that isn't secure enough, is my only option navigating to a hidden file and manually deleting it?

noob42
  • 159
  • 2
  • 8
  • I guess that link below can help you, worked for me. [Link below](https://stackoverflow.com/questions/15381198/remove-credentials-from-git) – David Fornazier Sep 22 '17 at 22:00
  • @DavidFornazier I can get GIT to stop using the stored credentials, what I am wondering is if there is a way to have GIT **delete** the credential file – noob42 Sep 22 '17 at 22:09
  • What's wrong with `rm ~/.git-credentials`? Use `shred` or `dd` if you need to. – user202729 Nov 06 '19 at 02:36

1 Answers1

0

For me this command helps: rm ~/.git-credentials. I use Windows 10 and bash. This exactly delete this file.