参考:
【GitLab】-HTTP Basic: Access denied.remote:You must use a personal access token-CSDN博客
拉取时会报这个错误:
Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See https://gitlab.
2FA 就是双因子认证。这时候需要用访问令牌来代替你的 password
格式:git clone http://{username}:{token}@{URL}
令牌有效期最大12个月
关于令牌:
“Personal Access Tokens
You can generate a personal access token for each application you use that needs access to the GitLab API.
You can also use personal access tokens to authenticate against Git over HTTP. They are the only accepted password when you have Two-Factor Authentication (2FA) enabled.”
仔细看,什么是access Tokens?access token可以用来访问GitLab API,可以通过HTTP的方式认证,当启用Two-Factor Authentication (2FA)双因子认证时,只能通过这种方式作为密码访问。