git
has support for integrating with local keyring/password management utilities; search google for "git (name of your keyring program)". (These are called "credential helpers".)
Alternatively, if your remote is over SSH, you can use public key authentication, along with ssh-agent
to remember the password to your private key.
If it's something else entirely that you're storing the password for (the "email password"?), you could consider a similar tactic: integrate with the local keyring manager. I'm not sure if git credential helpers can do this directly for you or not, but you might be able to implement the same side of the protocol as git, and thus use credential helpers that already exist.