0

When I try to push the code using git push in the git-bash terminal I get the remote: Invalid username or password., but when try pushing the code using Visual studio code or IntelliJ, it prompts me to enter username and password. After entering the u/n and password, it gets successfully pushed. How do I fix this in git-bash? The git-bash doesn't prompt me to enter username and password.

Below is the command:

$ git push --set-upstream origin fix_sonar
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.dhdjfjfn.com/jdjdjdjd/nvbcf.git/'
Pritish
  • 658
  • 3
  • 16
  • 38
  • May be git config problem . take a look https://docs.github.com/en/get-started/getting-started-with-git/setting-your-username-in-git – Saikat Roy Feb 07 '22 at 07:41
  • Check if this help you https://stackoverflow.com/questions/11403407/git-asks-for-username-every-time-i-push – miftahulrespati Feb 07 '22 at 07:45

1 Answers1

0

Sometimes git caches credentials even if you mistyped try "cmdkey delet" and the URL of your repository. Then you should also be asked for your login data on the bash.

HawkClear
  • 19
  • 2