ios - Xcode 7 GM 无法提交(GIT)

标签 ios xcode git xcode7

每当我尝试提交时,使用 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/

相关文章:

ios - 你能让贴纸应用程序有声音吗?

屏幕锁定后,iOS 监听套接字成为错误的文件描述符

ios - 使用未声明的类型 'Object'

ios - 无法在此文件中预览 - [应用程序名称].app 可能在 Xcode 11 Beta 5 上崩溃

ios - iPad + UIWebView + PresentModalViewController

ios - xcode 8 不支持 iOS 8 中的 indexPathsForVisibleRows

ios - 按下特殊表格 View 单元格时如何更改多个标签中的文本?

git - 使用 git grep 浏览文件的先前版本?

git - 防止 git merge 确认提交消息

git - 与 SSH key 相比,使用 GPG key 签署 git commit 有什么优势