解决上传到github报错Successfully created project 'autotest' on GitHub, but initial commit failed:

经过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"