今天博主正在愉快地學習在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"
上面的郵箱地址和 用戶名,可隨便寫