I have been pushing to a public repo for a long time, everytime when I do git push
, I didn't have to enter username/password, the pushing process just happened instantly when I hit Enter.
Today I want to push my project to my private repo, after adding my private repo to my remote using git remote add private <url>
,I tried git push
but a fatal error came out and said "authentication failed, invalid username or password".
I mean, I couldn't even enter my username or password, so the username or password I have right now is probably for my public repo. So how do I make git to let me enter username and password again?