github官方文案
You should create a personal access token to use in place of a password with the command line or with the API.
1 进入个人github账户setting
2 点击Developer settings
3 选择Personal access tokens
4点击 Generate new token
5 为你创建的token添加描述
6 选择token有效期时间。可以选择永不过期
7 为token赋予权限。如果从命令行操作仓库,至少选中repo 可以全选
8 点击生成。生成之后先复制下来,后面会用到。注意:离开这个页面,之后你将看不见这个token的明文了。