Command Line Git Operations Repeatedly Prompt for Username and Password
When executing git pull/push operations in the terminal, it keeps prompting for username and password, even though I’ve already entered them before. Here’s how to solve this issue.
Git Prompting for Username and Password
1 | Username for 'https://git.xxx.com': Password for 'https://git.xxx.com': |
Solution
- Open the terminal and execute
git config --global credential.helper store
command to store credentials locally. - Execute the
git pull/push
operation, enter username and password once, and it won’t prompt again for subsequent operations.