git版本 1.7.9以后
1. 开启
git config --global credential.helper cache
2. 设置时间
git config credential.helper 'cache --timeout=3600'
git版本 1.7.9以前
git config remote.origin.url https://you:password@github.com/you/example.git
参考:http://stackoverflow.com/questions/5343068/is-there-a-way-to-skip-password-typing-when-using-https-github/5343146#5343146