GitHub 桌面 - 由于未知用户无法 Upload/Update 项目

GitHub Desktop - Cannot Upload/Update Projects Because of Unknown User

描述

Uploading/Updating使用GitHubDesktop的项目以前很简单,现在就停了,
由于正在发生这个巨大的错误。

版本

GitHub 桌面版: 1.0.12
OS版本:Windows10

重现步骤

  1. 正常启动GitHub桌面
  2. Upload/Update 任何项目
  3. 获取错误

预期行为: Upload/Update 项目

实际行为: 错误说:“

Commit failed - exit code 128 received, 
Please tell me who you are.

重现频率:总是

日志

2018-01-14T05:50:48.279Z - info: [ui] [AppStore] loading 1 repositories from store
2018-01-14T05:50:48.295Z - info: [ui] [AppStore] found account:  GitHub Name (Full Name)
2018-01-14T05:50:50.742Z - info: [ui] launching: 1.0.12 (Windows 10.0.15063)
2018-01-14T05:50:50.749Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 2.494s)
2018-01-14T05:50:50.765Z - info: [ui] Executing getBranches: git for-each-ref --format=%(refname)%00%(refname:short)%00%(upstream:short)%00%(objectname)%00%(author)%00%(parent)%00%(symref)%00%(subject)%00%(body)%00%1F refs/heads refs/remotes (took 2.318s)
2018-01-14T05:50:50.766Z - info: [ui] Executing getRecentBranches: git log -g --no-abbrev-commit --pretty=oneline HEAD -n 2500 -- (took 2.290s)
2018-01-14T05:50:53.624Z - info: [ui] Executing getAuthorIdentity: git var GIT_AUTHOR_IDENT (took 1.962s)
2018-01-14T05:50:54.672Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 4.525s)
2018-01-14T05:51:04.622Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 3.461s)
2018-01-14T05:56:15.470Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.420s)
2018-01-14T06:01:25.864Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.381s)
2018-01-14T06:06:36.464Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.555s)
2018-01-14T06:11:50.576Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 4.717s)
2018-01-14T06:15:19.466Z - info: [ui] [AppStore] loading 1 repositories from store
2018-01-14T06:15:19.469Z - info: [ui] [AppStore] found account: GitHub Name (Full Name)
2018-01-14T06:15:20.585Z - info: [ui] launching: 1.0.12 (Windows 10.0.15063)
2018-01-14T06:15:20.586Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 1.121s)
2018-01-14T06:15:21.700Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 1.809s)
2018-01-14T06:15:51.704Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 2.835s)
2018-01-14T06:21:00.310Z - info: [ui] Executing getBranches: git for-each-ref --format=%(refname)%00%(refname:short)%00%(upstream:short)%00%(objectname)%00%(author)%00%(parent)%00%(symref)%00%(subject)%00%(body)%00%1F refs/heads refs/remotes (took 1.480s)
2018-01-14T06:21:00.310Z - info: [ui] Executing getRecentBranches: git log -g --no-abbrev-commit --pretty=oneline HEAD -n 2500 -- (took 1.461s)
2018-01-14T06:21:00.331Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 2.076s)
2018-01-14T06:21:21.829Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 1.802s)
2018-01-14T06:21:24.623Z - info: [ui] Executing updateIndex: git update-index --add --remove --replace -z --stdin (took 2.662s)
2018-01-14T06:21:25.955Z - info: [ui] Executing createCommit: git commit -F - (took 1.331s)
2018-01-14T06:21:25.958Z - error: [ui] `git commit -F -` exited with an unexpected code: 128.

    Please tell me who you are

Run

  `git config --global user.email "you@example.com"`<br />
  `git config --global user.name "Your Name"`<br />

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 'Name@AccountName.(none)')

2018-01-14T06:22:03.119Z - info: [ui] Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z (took 20.402s)
2018-01-14T06:22:03.345Z - info: [ui] Executing getBranches: git for-each-ref --format=%(refname)%00%(refname:short)%00%(upstream:short)%00%(objectname)%00%(author)%00%(parent)%00%(symref)%00%(subject)%00%(body)%00%1F refs/heads refs/remotes (took 20.546s)
2018-01-14T06:22:03.346Z - info: [ui] Executing getRecentBranches: git log -g --no-abbrev-commit --pretty=oneline HEAD -n 2500 -- (took 16.309s)

附加信息

使用 git config --global user.email "you@example.com" 甚至不起作用,命令提示符甚至说:

'git' is not recognized as a internal or external program.

重装也不行!

您应该输入,使用您的 GitHub 帐户电子邮件(以及您想要的任何名称):

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

但是如果Git无法识别,解压最新的Git for Windows release, which is PortableGit-2.15.1.2-64-bit.7z.exe and add it to your PATH (as I do here).