On Sat, 19 Jan 2013 01:08:47 +0800 lei yang <yanglei.f...@gmail.com> wrote:
> >> git config --global sendemail.smtppass xxxx this will display > >> password in .git config > >> > >> can we avoid this ? > > > > Yes, do not keep passwords in your configuration files. > > but if we don't put it in the configuration file, it will let me input > it, that's not a easy life, how do you do that Okay, the only (partial) solution to this sort of problems is to have such a password cached in a so-called authentication agent (ssh-agent from the SSH suite which caches your decrypted private keys is a good example) or in the so-called keyring which is provided by certain OS/DEs; in ether case the facility which provides such a caching typically asks for the password the first time it's needed and then keeps it in memory for the end of the user's login session. I do not think this is supported for the indicated setting though. I only saw certain work done on supporting keyrings for HTTP[S] authentication, so you could ask on the main Git list about whether using keyring for the SMTP password is available/planned. Also I was able to google something which might provide a solution -- a program [1] which is able to cache SMTP authentication info in the GNOME keyring for usage with msmtp. IIRC, msmtp can be configured to be the MSP for `git send-email`, so you could probably try to roll this solution, if you're using GNOME. 1. https://github.com/ervandew/keyring --