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

Posted by TaaviE on in Linux. updated Tags: git.