跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • git 自动提交脚本 push 后显示的是别人的帐号(确定邮箱不是那个人的)
未分類
6 10 月 2020

git 自动提交脚本 push 后显示的是别人的帐号(确定邮箱不是那个人的)

git 自动提交脚本 push 后显示的是别人的帐号(确定邮箱不是那个人的)

資深大佬 : DeathWing 2

一开始无聊写了个脚本,本地测试了一下,可以自动提交代码。随后丢到服务器上。今天一看 git log,日志显示:Author: ubuntu [email protected] ,随后检查 git config –list,user.name 和 user.email 都是我自己的没错,那到此我觉得可能脚本哪里不完善。

重点来了!!!

我登录 github 看的时候,这个提交的头像竟然是路飞??还是个国人,一看这个人的资料写的是 [email protected] 。我在想,难道这个人的 github 注册邮箱是 [email protected] ?不可思议。。。

大佬有話說 (18)

  • 主 資深大佬 : DeathWing

    [Imgur]( git 自动提交脚本 push 后显示的是别人的帐号(确定邮箱不是那个人的))

  • 資深大佬 : ericwood067

    []( https://docs.github.com/en/[email protected]/github/committing-changes-to-your-project/why-are-my-commits-linked-to-the-wrong-user)

    Commits are linked to another user
    If your commits are linked to another user, that means the user has added the email address in your local Git configuration settings to their GitHub account. In this case, you can change the email in your local Git configuration settings and add the new email address to your GitHub account to link future commits to your account.

  • 主 資深大佬 : DeathWing

    @ericwood067 那他把 [email protected]main 加到了他账户里?这。。好像说不通

  • 資深大佬 : ericwood067

    @DeathWing 应该是这样的,github 的 settings 里有一个 Emails,里面有一个 Add email address 的选项。

  • 資深大佬 : Kr98

    @ericwood067 关键是他怎么通过邮箱验证的

  • 資深大佬 : ODD10

    我用 mac 和 ios 提交,头像不一样。
    一个是旧的头像,一个是新的头像。

    用的 vscode 和 working copy

  • 資深大佬 : sola97

    我也遇到过

  • 主 資深大佬 : DeathWing

    @ODD10 但是用户是一个用户吧?我这个路飞头像是可以直接到另一个帐号的= =哈哈

  • 主 資深大佬 : DeathWing

    @sola97 和我一模一样的情况?

  • 主 資深大佬 : DeathWing

    @Kr98 我觉得应该不是路飞小哥绑了那个邮箱=。=

  • 資深大佬 : Exin

    羡慕你们有头像的,我总是显示不出头像来

  • 資深大佬 : BIAOXYZ

    把本地所有的 config 都核对一下( git config -l + –system/–global/–local )。

  • 資深大佬 : lxilu

    前贴 Github 奇葩项目提到伪造作者或可参考

  • 主 資深大佬 : DeathWing

    @lxilu 搜了一下 没怎么找到~方便的话 能不能贴一下链接 我去观摩下

  • 主 資深大佬 : DeathWing

    @Exin – -?为啥显示不出来

  • 主 資深大佬 : DeathWing

    @BIAOXYZ 这个不是主要问题,主要是脚本 commit 的时候用的 [email protected],而这个邮箱在 github 上对应的是路飞头像。
    另外,config 这个第一时间确认过了,除了 system 没有设置外其他都是我自己。我后来推测是因为在我的环境下使用 subprocess 读取不到 user config,所以我在脚本里每次提交前添加了一下 username 和 Email 就搞定了。主要是路飞这个太诡异了=。=

  • 資深大佬 : yanqiyu

    建议发邮件直接请教

  • 資深大佬 : lxilu

    好像没用…… https://github.com/jayphelps/git-blame-someone-else

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具