git asking for password every time

C++
# it will ask just one more time
git config --global credential.helper store$ git config credential.helper store
$ git push https://github.com/repo.git

Username for 'https://github.com': <USERNAME>
Password for 'https://[email protected]': <PASSWORD>
git config --global credential.helper store
git config --global credential.helper cache

Source

Also in C++: