I have basically two problems to solve:
1) I like use the gist and some other github command line tools and I don't want to type my password every time I use them.
2) I'm not comfortable saving my password in plain text files
The answer for the first problem is the use of the git config utility. And it's actually the cause of the second problem!
My answer for the second problem is the security tool that comes with Mac OS and allows you to access your passwords from the command line.
here is the github section in my .gitconfig file:
user = clarete
password = !security find-generic-password -wgs org.comum.lincoln.conf.github | tr -d '\n'
You can prefix all the values in your git config variables with an exclamation mark (!) to make git execute the values as a shell command.
I had to use the | tr -d '\n' to get rid of an annoying new line that the security utility prints out.
I have a keyring entry called org.comum.lincoln.conf.github in my keychain. Maybe just github.password would be better, but I love namespaces.