每当我尝试提交时,使用 Xcode 中的源代码控制,我都会收到一个错误,提示我需要配置我的电子邮件地址和名称(它似乎错误地读取了我的电子邮件地址)。我去了航站楼,(再次)进入了他们。错误并没有消失。
我可以在终端中正常提交,但不能在 Xcode 中提交。有办法解决吗?或者直接在 Xcode 中输入配置信息?
这是错误信息:
*** 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: unable to auto-detect email address (got 'myemail@gmail-1040826.(none)')
这是我的 .gitconfig(出于隐私原因,我用“我的名字”替换了我的真实姓名,用“我的名字”替换了我的用户名):
myname-1040826:Project myname$ git config -l
user.email=myname@gmail.com
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 "you@example.com"
git config user.name "Your Name"
注意:执行上述操作时,请确保您位于项目的目录中。
关于ios - Xcode 7 GM 无法提交(GIT),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32544188/