【问题标题】:Can't finish github sharing process [duplicate]无法完成github共享过程[重复]
【发布时间】:2021-02-23 21:21:52
【问题描述】:

我正在尝试在 GitHub 上共享我的一个 IntelliJ 项目,但每当我尝试这样做时,都会收到一条错误消息,提示它成功创建了项目但初始提交失败。它为我提供了有关如何解决此问题的说明,但我不知道这些说明的含义。谁能破译错误并告诉我该怎么做?

这是错误:

Can't finish GitHub sharing process
Successfully created project 'basic-program' on GitHub, but initial commit failed:
*** 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. unable to auto-detect email address (got 'Owner@****.(none)')

【问题讨论】:

  • 您是否尝试过从错误消息中运行命令(即 git config ...)?
  • 下次请把错误信息作为文字附上,并添加图片以供澄清。这样,其他人在搜索确切错误时就能找到您的问题和答案。

标签: git github intellij-idea


【解决方案1】:

基本上,在您创建提交之前,git 需要知道您是谁以及如何引用您。要告诉 git 你是谁,请运行以下命令。

设置用户名:

git config --global user.name "Firstname Lastname"

设置邮箱:

git config --global user.email your@email.address

之后,您将能够创建提交。也许您可以重新运行导致此错误的任何操作。

git config 命令的进一步参考

--global 将使本地计算机上当前用户的每个 git 存储库都使用这个(例如 user.name)值。如果设置了此值,则覆盖系统配置。

--local(或者什么都没有,因为这是默认设置)将使只有本地机器上的当前 git 存储库使用这个(例如 user.name)值。如果设置了此值,则覆盖全局和系统配置。

--system 将使本地计算机上的所有用户的每个 git 存储库都使用此(例如 user.name)值。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-28
    • 2014-04-30
    • 1970-01-01
    • 1970-01-01
    • 2016-09-28
    相关资源
    最近更新 更多