Save the username and password globally:
git config --global user.name "fname lname"
git config --global user.email "example@gmail.com"
git config --global user.password "secret"
Get a specific setting,
git config --global --get user.name
git config --global --get user.email
git config --global --get user.password
Getting all Git settings:
git config --list --show-origin