If you're cloning GitHub repositories using HTTPS, you can use a credential helper to tell Git to remember your GitHub username and password every time it talks to GitHub.
Tip: You need Git 1.7.10 or newer to use the credential helper.
Turn on the credential helper so that Git will save your password in memory for some time. By default, Git will cache your password for 15 minutes.
$ git config --global credential.helper cache
To set git to use the credential memory cache
$ git config --global credential.helper 'cache --timeout=3600'
To set the cache to timeout after 1 hour (setting is in seconds)
From this document