Git credentials

Hi all.

When I set a git push or a git pull I get this message:

remote: Invalid username or password.
fatal: Authentication failed for

I have already set the token correctly, because it was working with another repository. But I don’t know what to try. Also I set correctly the user and password (token) with:

git config --global --edit

How can I make the console ask me for the username and password again?

I got it: I must set:

git remote set-url origin https://token]

I do not know why it is