You, or some software you are using, has set:
GIT_TERMINAL_PROMPT=0
or:
GIT_TERMINAL_PROMPT=false
in your environment. Stop doing that, or make the software stop doing that. (See also go get results in 'terminal prompts disabled' error for github private repo and How do I disable credential prompting for git clone in Go?)
Alternatively, set up your credential manager1 to store or cache the user name and password. Be careful with this, especially because many of these store passwords insecurely (e.g., in cleartext).
Alternatively, use ssh
instead of https
. While https authentication requires that Git obtain a user name and password from a credential manager, ssh authentication does not.
1Git itself doesn't do any authentication. Instead, it fobs this off on other programs or libraries. To use https authentication, Git has to invoke library routines, for which it needs a user name and password; to obtain the user name and password, Git invokes a separate credential manager. There are many credential managers, and they are both OS- and user-dependent, so that you can choose a credential manager that works only on your Mac, or one that works only on your Windows system. Git also comes with some simple-and-dumb credential managers that just store the user name and password in a file, or in some temporary storage.