GitHub 官方说明
we announced our intent to require the use of token-based authentication (for example, a personal access, OAuth, or GitHub App installation token) for all authenticated Git operations. Beginning August 13, 2021, we will no longer accept account passwords when authenticating Git operations on GitHub.com
意思说2021 年 8 月 13 日开始 Git 操作进行身份验证时不再接受帐户密码
你用帐号密码登入的时候就会出现
invalid authentication data 404 not found - not found
所以都用令牌登入吧!~
那我们来产生令牌吧!
首先你要有GitHub帐号
登入GitHub之后 点选右上角头像 点选设定
找到开发设置
产生令牌
勾选权限
一直照着下一步就会产生令牌 会得到一段随机组成的数
接下来设置Android Studio
成功登入了
记得设定为预设 不然每次上传都要再输入
再来把专案内容上传到储存库
创建库
预设值
照着他下一步执行 你在Git上面就会创建库了
当然你可以在网站版新增库 , 但我觉得这样比较快
强制推送
讯息中出现
代表上传了GitHub了