GitLab 将计算机名称 + 路由器名称显示为提交者名称
GitLab showing computer name + router name as commiter name
我最近重新安装了 GitHub Desktop(我使用的 Git 客户端),现在我对 GitLab 项目所做的所有提交都显示在用户名“[My mac 用户名]@[我的电脑名称].[我的路由器名称]”,而不是我在 Git 实验室安装中的用户名。
我做错了什么?
我该如何解决这个问题?
Git 确实在您的机器上完全在本地提交,您推送这些提交的站点只是读取它们。因此,您的 Gitlab 帐户与您提交的身份无关。这对于谁在什么时候做了什么的完整性至关重要。
您得到的是来自 Git 的默认用户名。 Git 命令行客户端通常会向您发出警告和说明:
$ git commit
[master (root-commit) cc46c07] Foo
Committer: Michael Schwern <schwern@Windhund.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bar
Github 桌面可能有自己的配置。它将使用您的 Github 身份,而不是您的 Gitlab。确保您已在“首选项”->“帐户”中登录。同时检查 Preferences->Advanced 并确保你的 Git Config identity 是正确的。
我最近重新安装了 GitHub Desktop(我使用的 Git 客户端),现在我对 GitLab 项目所做的所有提交都显示在用户名“[My mac 用户名]@[我的电脑名称].[我的路由器名称]”,而不是我在 Git 实验室安装中的用户名。
我做错了什么? 我该如何解决这个问题?
Git 确实在您的机器上完全在本地提交,您推送这些提交的站点只是读取它们。因此,您的 Gitlab 帐户与您提交的身份无关。这对于谁在什么时候做了什么的完整性至关重要。
您得到的是来自 Git 的默认用户名。 Git 命令行客户端通常会向您发出警告和说明:
$ git commit
[master (root-commit) cc46c07] Foo
Committer: Michael Schwern <schwern@Windhund.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bar
Github 桌面可能有自己的配置。它将使用您的 Github 身份,而不是您的 Gitlab。确保您已在“首选项”->“帐户”中登录。同时检查 Preferences->Advanced 并确保你的 Git Config identity 是正确的。