Gitting git not to be a pain
Are you tired of git always pestering you about your password in one of your 100 repositories cloned into your system? Even worse, do you have multiple git accounts and it's just absolutely maddening?
Ideally one would just use SSH/GPG keys for this, but this issue occurs when using more than one GitHub account.
No longer do you have to search for "git permanently store password" or "git credential helper cache infinite timeout".
There's a solution to this maddening behaviour, just edit your .git/config and your troubles are over, no more stupid behaviour
[user] name = Username email = Email password = Password [credential] helper = cache
And git just becomes usable.
P.S: You might get:
$ git fetch remote: Repository not found. fatal: repository 'https://github.com/TaaviE/Gadgetbridge.git/' not found
Just delete ~/.git-credentials, git can't handle storing passwords for multiple accounts properly :')
External references
- Git credential helper causes repository not found error - https://stackoverflow.com/questions/39239417/git-credential-helper-causes-repository-not-found-error
- Skip password when using https:// on GitHub https://stackoverflow.com/questions/5343068/is-there-a-way-to-skip-password-typing-when-using-https-on-github