git clone https报错之fatal: Authentication failed for

password 是 token 而不是 GitHub 账号的密码. username 是 GitHub 的 username

设置 token 步骤:

GitHub 网页 右上角 头像 -> settinSettings -> Developer settingsgs -> Personal access tokens

没有的话 新建一个 token, note 写备注的名字 (我写的是 token_for_terminal, 在 terminal 中 push 代码用的)

有效期我选了 永久有效 (no expiration date)。还要增加一个写权限。如图:


image.png

参考:

  1. https://cloud.tencent.com/developer/article/1985168
  2. https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

你可能感兴趣的:(git clone https报错之fatal: Authentication failed for)