This problem is mainly caused by the incorrect user remembered in the git user credentials, or the user does not have permissions.
The solution is as follows. Delete the git related users in the user credentials and then reconfigure:
Delete and modify the saved git account:
1.Mac changes the saved git account in the keychain
2. Windows Modify in Control Panel-Credential Manager
3.Linux: vi ~/.git-credentials can see the saved account password, delete or modify it! Delete all and re-enter to solve the problem
git config --global credential.helper store #No need to enter again after the first input
Just re-enter the username and password when git pull