提交代码到github原本使用github的登录账号和密码即可。现在github出于安全的考虑,将在2021年8月停止使用账号和密码的方式访问github仓库,改为token认证的方式。
创建步骤
点击Settings
image
点击Developer settings
image
点击Personal access tokens
image
点击Generate new token
image
选择repo
image
点击Generate token
image
复制token
,并保存好,github不会保存token,离开这个页面就再也看不到这个token了。
image
以后访问github仓库就这样:
$ git clone https://github.com/username/repo.git
Username: your_username
Password: your_token