Android Studio 上传GitHub

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
http://img2.58codes.com/2024/201375198d0p775Ghy.jpg

所以都用令牌登入吧!~

那我们来产生令牌吧!
首先你要有GitHub帐号

登入GitHub之后 点选右上角头像 点选设定
http://img2.58codes.com/2024/20137519uOvTV5BjCL.jpg

找到开发设置
http://img2.58codes.com/2024/2013751953xwwLvaUV.jpg

产生令牌
http://img2.58codes.com/2024/20137519aMjiIeLMQ0.jpg

勾选权限

http://img2.58codes.com/2024/20137519nJRhCfLuID.jpg

一直照着下一步就会产生令牌 会得到一段随机组成的数

接下来设置Android Studio
http://img2.58codes.com/2024/20137519pgwCvPpfcY.jpg

成功登入了
http://img2.58codes.com/2024/2013751949EA0mwTAA.jpg

记得设定为预设 不然每次上传都要再输入

再来把专案内容上传到储存库

创建库
http://img2.58codes.com/2024/20137519WNBs3Ot17D.jpg

预设值
http://img2.58codes.com/2024/20137519a43qTXKgDz.jpg

照着他下一步执行 你在Git上面就会创建库了
当然你可以在网站版新增库 , 但我觉得这样比较快

强制推送
http://img2.58codes.com/2024/201375198R42NlyVYp.jpg

讯息中出现
http://img2.58codes.com/2024/20137519Lmsdd7Bs2O.jpg

代表上传了GitHub了


关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章