代码之家  ›  专栏  ›  技术社区  ›  Henry Yang

如何绕过:remote:GitLab:Author<non-member email here>不是团队成员?

  •  0
  • Henry Yang  · 技术社区  · 6 年前

    我有一个GitLab项目(源代码),它最初是从另一个GitHub项目(GitHub)克隆的。

    $ git remote
    github
    origin
    

    git remote add github https://the-git-hub-remote.git
    

    现在我想将GitHub的新更改合并到本地代码中。所以我做了以下的事情

    在我的本地计算机上,我从GitHub获取了更改

    git fetch github
    

    然后我复制GitHub的 master github-master

    git checkout -b github-master github/master
    

    现在我想把它推到我的GitLab回购,但它抱怨:

    $ git push origin
    Enumerating objects: 6813, done.
    Counting objects: 100% (6083/6083), done.
    Delta compression using up to 8 threads.
    Compressing objects: 100% (1842/1842), done.
    Writing objects: 100% (5721/5721), 2.09 MiB | 42.05 MiB/s, done.
    Total 5721 (delta 4008), reused 5313 (delta 3735)
    remote: Resolving deltas: 100% (4008/4008), completed with 224 local objects.
    remote: GitLab: Author 'brian.riley@ucop.edu' is not a member of team
    To my-git-lab-remote.git
     ! [remote rejected]   github-master -> github-master (pre-receive hook declined)
    error: failed to push some refs to 'git@my-git-lab-remote.git'
    

    我该怎么办?

    基本上,我和维穆鲁甘·维莱尤瑟姆的问题是一样的 https://gist.github.com/DavideMontersino/810ebaa170a2aa2d2cad

    谢谢!

    1 回复  |  直到 6 年前
        1
  •  4
  •   VonC    6 年前

    如中所示 issue 17244

    Check whether author is a GitLab user
    Restrict commits by author (email) to existing GitLab users
    

    你至少可以要求暂时取消激活所说的钩子,让你的初始推动完成。

        2
  •  0
  •   amit shah    4 年前

    请检查主目录中是否存在文件.gitconfig。如果存在,则用gitlab中的user exists替换用户名。再次克隆repo,进行更改并推动更改。这可能不是完美的,但我想分享,因为它为我工作。