git-configuration list
$ git config --global user.name myusername
$ git config --global user.email myemail
$ git config --global github.user myusername
$ git config --global github.token mytoken
#Make sure you are using ssh url for the github repo rather than the https url.
#It will ask for username and password when you are using https and not SSH.
#You can check
1. the file .git/config, or
2. run git config -e, or
3. git remote show origin
#to verify the url and change it if needed.
or to cache it within time period
$ git config --global credential.helper cache
$ git config --global credential.helper "cache --timeout=3600"
or using keychain
$ git config --global credential.helper osxkeychain # git-credential-winstore.exe(W32)/gnome-keyring (Linux)