Git提交代码失败: empty ident name (for <>) not allowed

使用git提交代码,报错如下:

下午2:56	Commit failed with error
0 files committed, 1 file failed to commit: 升级
empty ident name (for <>) not allowed

原因为git没有找到该项目对应的用户名和密码,执行如下操作

git config  user.email "you@example.com"  
git config  user.name "Your Name"

问题解决,正常提交并推送。  

设置全局默认配置:

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

  

原文地址:https://www.cnblogs.com/gongxr/p/9294605.html