Under linux:
1. Under ~/, touch to create the file .git-credentials, edit this file with vim, enter:
https://{username}:{password}@github.com
Note to remove {}
2. Execute git config –global credential.helper store in the terminal
3. You can see the ~/.gitconfig file, there will be one more item:
[credential]
helper = store