git - 如何绕过 : remote: GitLab: Author <non-member-email-here> is not a member of team?

标签 git github gitlab githooks git-remote

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

$ git remote
github
origin

我通过以下方式实现了这一点:
git remote add github https://the-git-hub-remote.git

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

在我的本地计算机上,我从 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 中遇到与 Velmurugan Velayutham 相同的问题

谢谢!

最佳答案

issue 17244 中所示,检查项目钩子(Hook)的配置:

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

您至少可以要求暂时停用所述 Hook ,以完成您的初始推送。

关于git - 如何绕过 : remote: GitLab: Author <non-member-email-here> is not a member of team?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54545396/

相关文章:

git - 使用 git 追加分支提交

git - 如何重新连接 git 存储库和 svn 存储库?

java - 更新到最新版本后缺少 Artifact

ajax - Facebook 和 Github 如何在不重新加载页面的情况下更改那里的 URL

gitlab - gitlab ci 管道文件中的引用策略是什么?

python - 当我的 gitlab 存储库中有新提交时,如何立即执行 python 脚本?

git - 如何以编程方式编辑 git 分支的描述?

没有历史的 Git pull

git - SHA-1 用于提交到 github

gitlab - 将 Gitlab CI 阶段配置为不并行运行