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 "[email protected]" 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
[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
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 "[email protected]"
git config user.name "Your Name"
Note: Make sure you are in the project's directory when you do the above.
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 "[email protected]"
git config --local user.name "yourName"
This worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With