A very detailed answer (and a full one) can be found here.
This is the very short brief of it so you should read the full one above.
First of all its much better to use ssh keys instead of username password so you will not be prompt for those again.
If you still wish to use username/password pair you need to set the credential.helper
flag.
https://www.kernel.org/pub/software/scm/git/docs/gitcredentials.html
From the git config documentation:
credential.helper
Specify an external helper to be called when a username or password credential is needed; the helper may consult external storage to avoid prompting the user for the credentials. Note that multiple helpers may be defined. See gitcredentials(7) for details.
credential.useHttpPath
When acquiring credentials, consider the "path" component of an http or https URL to be important. Defaults to false. See gitcredentials(7) for more information.
credential.username
If no username is set for a network authentication, use this username by default. See credential..* below, and gitcredentials(7).