iT邦幫忙

0

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
https://ithelp.ithome.com.tw/upload/images/20210705/201375198d0p775Ghy.jpg

所以都用令牌登入吧!~

那我們來產生令牌吧!
首先你要有GitHub帳號

登入GitHub之後 點選右上角頭像 點選設定
https://ithelp.ithome.com.tw/upload/images/20210705/20137519uOvTV5BjCL.jpg

找到開發設置
https://ithelp.ithome.com.tw/upload/images/20210705/2013751953xwwLvaUV.jpg

產生令牌
https://ithelp.ithome.com.tw/upload/images/20210705/20137519aMjiIeLMQ0.jpg

勾選權限

https://ithelp.ithome.com.tw/upload/images/20210705/20137519nJRhCfLuID.jpg

一直照著下一步就會產生令牌 會得到一段隨機組成的數

接下來設置Android Studio
https://ithelp.ithome.com.tw/upload/images/20210705/20137519pgwCvPpfcY.jpg

成功登入了
https://ithelp.ithome.com.tw/upload/images/20210705/2013751949EA0mwTAA.jpg

記得設定為預設 不然每次上傳都要再輸入

再來把專案內容上傳到儲存庫

創建庫
https://ithelp.ithome.com.tw/upload/images/20210705/20137519WNBs3Ot17D.jpg

預設值
https://ithelp.ithome.com.tw/upload/images/20210705/20137519a43qTXKgDz.jpg

照著他下一步執行 你在Git上面就會創建庫了
當然你可以在網站版新增庫 , 但我覺得這樣比較快

強制推送
https://ithelp.ithome.com.tw/upload/images/20210705/201375198R42NlyVYp.jpg

訊息中出現
https://ithelp.ithome.com.tw/upload/images/20210705/20137519Lmsdd7Bs2O.jpg

代表上傳了GitHub了


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言