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?

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 :')

References:

https://stackoverflow.com/questions/39239417/git-credential-helper-causes-repository-not-found-error?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa https://stackoverflow.com/questions/5343068/is-there-a-way-to-skip-password-typing-when-using-https-on-github

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