android studio上傳項目到github報錯Successfully created project 'Demo' on GitHub, but initial commit failed:


今天博主正在愉快地學習在AndroidStudio中使用Git,結果報了下面這個錯∑(っ°Д°;)っ:

 

Can't finish GitHub sharing process

Successfully created project 'Demo' on GitHub, but initial commit failed:

*** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for (null)>) not allowed during executing git -c core.quotepath=false commit -m "Initial commit" --

 

看了一下錯誤原因:Run git config --global user.email "you@example.com" git config --global user.name "

原來是git沒有配置的原因,找到git安裝目錄C:\Program Files\Git 下的Git Bash運行后輸入下面兩行代碼即可:

git config --global user.email "you@example.com"  

git config --global user.name "Your Name"

 

上面的郵箱地址和 用戶名,可隨便寫


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM