每当我尝试提交,在Xcode中使用源代码控制,我得到一个错误,我需要配置我的电子邮件地址和名称(似乎读取我的电子邮件地址不正确)。我去了航站楼,再次进入(再次)。错误没有消失。
我可以在Terminal中正常提交,但不能在Xcode中。有办法解决吗?还是直接在Xcode中输入配置信息?
这是错误信息:
*** Please tell me who you are.
Run
06000
to set your account’s default identity.
Omit –global to set the identity only in this repository.fatal: unable to auto-detect email address (got
‘myemail@gmail-1040826.(none)’)
这是我的.gitconfig(我的名字替换了我的名字,我的用户名为“myname”,为隐私)
myname-1040826:Project myname$ git config -l [email protected] user.name=My Name filter.media.clean=git-media-clean %f filter.media.smudge=git-media-smudge %f core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true core.precomposeunicode=true submodule.PeerKit.url=https://github.com/jpsim/PeerKit.git
解决方法
看起来Xcode没有读取全局GIT设置。如果您遇到此问题,请通过终端将您的姓名和电子邮件地址发送到具体项目:
git config user.email "[email protected]" git config user.name "Your Name"
注意:当您执行上述操作时,请确保您在项目的目录中。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。