經過IDEA上傳代碼到GitHub上但是有時候會碰到這樣的問題。git
當咱們選擇VCS->Import into Version Control->Share Project on GitHub提交代碼。點擊OK。而後就跳出了這樣的信息:github
Can't finish GitHub sharing processbash
Successfully created project 'autotest' on GitHub, but initial commit failed:ide
*** 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" --this
看了一下錯誤緣由:Run git config --global user.email "you@example.com" git config --global user.name "spa
原來是github沒有配置的緣由,解決辦法以下。
1. 在你安裝Git的目錄下找到git-bash這個可執行文件
2. 設置用戶名和郵箱地址,以下圖:rem
$ git config --global user.name "your name" $ git config --global user.email "your_email@youremail.com"