报错如下: 解决方法如下: cd 到 仓库目录下输入 ls -a,查看是否存在.git 然后cd到 .git,在该目录下 输入命令: vim config,进入vim在最后一行添加email和name: