GitHub桌面 - 由于用户不明,无法上传/更新项目

时间:2018-01-14 06:51:39

标签: git github project account

描述

使用GitHub Desktop上传/更新项目之前很容易,现在它停止了, 由于这个巨大的错误正在发生。

版本

GitHub桌面版: 1.0.12
操作系统版本: Windows 10

重现步骤

  1. 正常启动GitHub桌面
  2. 上传/更新任何项目
  3. 获取错误
  4. 预期行为:上传/更新项目

    实际行为:错误说:"

    (myenv) conda install -c rios -c conda-forge spdlib
    

    重现次数:始终

    日志

    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"

    即使重新安装也无法正常工作!

1 个答案:

答案 0 :(得分:0)

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

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

但如果无法识别Git,请解压缩最新的Git for Windows release PortableGit-2.15.1.2-64-bit.7z.exe并将其添加到您的路径(I do here)。