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.
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.
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)')
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.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
It's not only the matter in global settings, the real problem are local ones.
Try this.
cd your/project/directory
git config --local user.email "your@email.com"
git config --local user.name "yourName"
This worked for me.
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:
Note: Make sure you are in the project's directory when you do the above.