check git auth terminal code example
Example 1: git credentials
# this will store your credentials "forever"
git config --global credential.helper store
Example 2: how to get git username and password
$ git config --global user.name "Mona Lisa"
$ git config --global user.name
$ mona