无论何时我尝试提交,在Xcode中使用源代码控制,我都会遇到一个错误,我需要配置我的电子邮件地址和名称(它似乎读取的电子邮件地址不正确)。我去了码头,然后再次进入他们。错误没有消失。
Whenever I try to commit, using source control in Xcode, I get an error that I need to configure my email address and name (it seems to read my email address incorrectly). I went to the Terminal, and entered them (again). The error didn't go away.
我可以在终端中正常提交,但不能在Xcode中提交。有没有办法解决它?或者在Xcode中直接输入配置信息?
I can commit normally in Terminal, but not in Xcode. Is there a way to fix it? Or enter the configuration info directly in Xcode?
这是错误信息:
This is the error message:
***请告诉我你是谁。
*** Please tell me who you are.
运行
git config --global user.email "you@example" git config --global user.name "Your Name"来设置您的账户的默认身份。 Omit --global仅在此存储库中设置身份。
to set your account's default identity. Omit --global to set the identity only in this repository.
致命:无法自动检测电子邮件地址(获得'myemail @ gmail-1040826。(none)')
fatal: unable to auto-detect email address (got 'myemail@gmail-1040826.(none)')
这里是我的.gitconfig(为了保护隐私,我用我的名字取代了我的实际名称,而我的用户名用myname取代):
Here's my .gitconfig (I replaced my actual name with "My Name", and my username with "myname" for privacy reasons):
myname-1040826:Project myname$ git config -l user.email=myname@gmail 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=github/jpsim/PeerKit.git推荐答案
它看起来像Xcode不读全局GIT设置。如果您遇到此问题,请通过终端将您的姓名和电子邮件设置为特定项目:
It looks like Xcode is not reading global GIT settings. If you encounter this issue, set your name and email to the specific project via the Terminal:
git config user.email "you@example" git config user.name "Your Name"注意:确保您在项目目录中进行上述操作。
Note: Make sure you are in the project's directory when you do the above.
更多推荐
Xcode 7 GM无法提交(GIT)
发布评论