美文网首页
fatal: unable to auto-detect ema

fatal: unable to auto-detect ema

作者: moxfen | 来源:发表于2022-06-05 14:57 被阅读0次

前言

通过git clone将远程仓库克隆到本地后,本地使用git commit提交文件时报错,github上已添加id_rsa.pub

原因

邮箱校验失败,github无法确认当前账户是否有权限提交。

解决方式

进入到你本地克隆项目的路径cd ./projectName,设置用户名和邮箱。

git config user.name "YouUserName"
git config user.email "YouUserEmail"

提示:

其中YouUserName为你要设置到用户名称,YouUserEmail为生成id_rsa.pub且添加到github时填的邮箱。
网上有看到有设置全局用户和邮箱如:git config --global user.email "xxx" --这个我未测试,看个人需求。

相关文章

网友评论

      本文标题:fatal: unable to auto-detect ema

      本文链接:https://www.haomeiwen.com/subject/zxurmrtx.html