美文网首页
github利用Token上传

github利用Token上传

作者: 王欣12138 | 来源:发表于2022-04-08 17:56 被阅读0次

github提交代码发现无法提交,错误提示:

remote: Support for password authentication was removed on August 13, 2021.

你原先的密码凭证从2021年8月13日开始就不能用了,必须使用个人访问令牌(personal access token),就是把你的密码替换成token。

原因:github为什么要把密码换成token

问题解决:
登录github -> Setting -> Developer setting -> Personal access tokens -> Generate new token

设置token的有效期,访问权限等
选择要授予此令牌token的范围或权限,30天、90天、还有永不过期
要使用token从命令行访问仓库,请选择repo。
要使用token从命令行删除仓库,请选择delete_repo
其他根据需要进行勾选
然后把远程地址修改为:

https://你的token@github.com/sober-orange/study.git
把token拼接在地址上

生成token之后,在使用git push去提交代码就可以了。

相关文章

网友评论

      本文标题:github利用Token上传

      本文链接:https://www.haomeiwen.com/subject/puiysrtx.html