Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >



如果你在七夕(没错就是2021年8月14日)的这一天去访问了全球最大的同性交友网站又刚好去更新提交代码或者你创建了一个新的仓库送给自己又刚好想把这个仓库送给github,你就刚好会遇到这个问题:remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
大概意思就是你原先的密码凭证从2021年8月13日开始就不能用了,必须使用个人访问令牌(personal access token),就是把你的密码替换成token!


This is a picture without description

Github 官方解释

We described our motivation as we announced similar changes to authenticating with the API as follows:

In recent years, GitHub customers have benefited from a number of security enhancements to, such as two-factor authentication, sign-in alerts, verified devices, preventing the use of compromised passwords, and WebAuthn support. These features make it more difficult for an attacker to take a password that’s been reused across multiple websites and use it to try to gain access to your GitHub account. Despite these improvements, for historical reasons customers without two-factor authentication enabled have been able to continue to authenticate Git and API operations using only their GitHub username and password.

Beginning August 13, 2021, we will no longer accept account passwords when authenticating Git operations and will require the use of token-based authentication, such as a personal access token (for developers) or an OAuth or GitHub App installation token (for integrators) for all authenticated Git operations on You may also continue using SSH keys where you prefer.

Tokens offer a number of security benefits over password-based authentication:

1.Unique – tokens are specific to GitHub and can be generated per use or per device

2.Revocable – tokens can can be individually revoked at any time without needing to update unaffected credentials

3.Limited – tokens can be narrowly scoped to allow only the access necessary for the use case

4.Random – tokens are not subject to the types of dictionary or brute force attempts that simpler passwords that you need to remember or enter regularly might be





登陆你的GitHub(注意,在github.com登录你的账户时还是用你的密码,不是令牌) 点击头像。随后点击settings。

This is a picture without description

往下拉,你会在左侧看到一个Developer settings。点击它。

This is a picture without description

左侧有Personal access tokens。点击它。

This is a picture without description

点击右侧generate new token。

This is a picture without description


expiration是令牌有效期限。No expiration代表永久令牌。

下面是选择相应的权限。一般就选择repo 和delete_repo,其他按需勾选。

拉到最下面,点击generate token,随后跳出来一个界面,有一串绿底字符串即为你的token令牌。

This is a picture without description



This is a picture without description