跳转到内容

GitHub生成Token

提交代码时报错(Password authentication is temporarily disabled as part of a brownout.)

或(Please use a personal access token instead.)

登录github官网,按以下图片步骤点击(其中repo必选)

getToken

创建后生成的token要保存好,只有创建时可见

通过令牌访问代码库

<token> -- 创建好的令牌

<username> -- github的用户名

<reponame> -- 远程仓库名

sh
git remote set-url origin https://<token>@github.com/<username>/<reponame>.git

首次clone代码

sh
git clone https://<token>@github.com/<username>/<reponame>.git