you're using pass, the best password manager, right?
https://passwordstore.org
this shell script plugs pass into git as a "credential helper"
chock it into your $PATH and run git config --global credential.helper pass, and thenceforth git will use pass to store credentials
https://git.orbital.rodeo/mike/home.git/html/bin/git-credential-pass.html
not bad for 28 sloc and i bet i can lose a few more
if you're using some other password manager, you can find similar tools for those here https://git-scm.com/doc/credential-helpers