本文介绍了!镜像git存储库后出现[远程拒绝]错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注此文档: https://help.github.com/articles/duplicating-a-repository/

I'm following this documentation:https://help.github.com/articles/duplicating-a-repository/

git clone --mirror https://github.com/exampleuser/repository-to-mirror.git

cd repository-to-mirror.git

git push --mirror https://github.com/exampleuser/mirrored

输出显示存储库已作为镜像推送,但由于某些原因,我也遇到了这些错误:

The output shows that the repository is pushed as a mirror, but for some reason I'm getting these errors as well:

 ! [remote rejected] refs/pull/1/head -> refs/pull/1/head (deny updating a hidden ref)
 ! [remote rejected] refs/pull/1/merge -> refs/pull/1/merge (deny updating a hidden ref)

这些错误是什么?我可以假定存储库已镜像吗?

What are these errors? Can I assume the repository was mirrored ?

推荐答案

此问题,发生在您镜像有拉请求的GitHub存储库时.

As mentioned in this issue, that happens when you mirror a GitHub repo which has pull requests made to it.

因此,当您推送所有真实引用时,提取请求不会得到更新

So, while you've pushed all your real refs, the pull requests don't get updated

您需要镜像GitHub存储库 而没有

You would need to mirror a GitHub repo without their pull requests.

fetch = +refs/heads/*:refs/heads/*
fetch = +refs/tags/*:refs/tags/*
fetch = +refs/change/*:refs/change/*

这篇关于!镜像git存储库后出现[远程拒绝]错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!