解決上傳到github報錯Successfully created project 'autotest' on GitHub, but initial commit failed:


通過IDEA上傳代碼到GitHub上可是有時候會碰到這樣的問題。

當我們選擇VCS->Import into Version Control->Share Project on GitHub提交代碼。點擊OK。然后就跳出了這樣的信息:

 Can't finish GitHub sharing process

Successfully created project 'autotest' 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 "

原來是github沒有配置的原因,解決辦法如下。 
1. 在你安裝Git的目錄下找到git-bash這個可執行文件 
2. 設置用戶名和郵箱地址,如下圖:

$ git config --global user.name "your name" $ git config --global user.email "your_email@youremail.com"


免責聲明!

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



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