When 2FA two-factor authentication is enabled, when git pull is enabled, an error is reported: Remote: HTTP Basic: Access Denied Remote: You can generate one athttps://xxx.com/-/profile/personal_access_tokens
1. After enabling 2FA two-factor authentication, git.exe pull –progress -v –no-rebase “origin”
Remote: HTTP Basic: Access Denied
Remote: You must use a personal access token withREAD_REpositoryOrwrite_repositoryScope for git over http.
Remote: You can generate one athttps://xxx.com/-/profile/personal_access_tokens
Fatal: Authentication failed forhttps://xxx.com/xgrit/object.git/
Git failed to end smoothly (exit code 1) (5344 ms @ 2022/6/29 10:42:11). as shown in Figure 1
2. Open:https://xxx.com/-/profile/personal_access_tokens, which generates Personal Access Token. as shown in Figure 2
3. Pull again, and the Git Credential Manager login box will pop up. The same error is still reported. as shown in Figure 3
4. Reset the remote repository address and add: oauth2:{personal_access_token}@. as shown in Figure 4
5. If the pull is successful, no error will be reported.



