AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 474257
Accepted
Philip Durbin
Philip Durbin
Asked: 2013-02-01 08:04:59 +0800 CST2013-02-01 08:04:59 +0800 CST 2013-02-01 08:04:59 +0800 CST

如何在 GitHub 存储库上“镜像自”?

  • 772

我注意到https://github.com/apache/ant说“从 git://git.apache.org/ant.git 镜像”(带有链接),我也想这样做。

https://exyr.org/2011/git-mirrors/似乎是对一般技术(基本上是 cron 作业)的很好的描述,但我遇到了一些奇怪的错误,而且我没有看到“镜像自” https://github.com/pdurbin/openscholar(目的地)。我希望镜像的来源是https://github.com/openscholar/openscholar

这是我看到的(修剪过的)输出:

murphy:~ pdurbin$ cd /tmp
murphy:tmp pdurbin$ git clone --mirror https://github.com/openscholar/openscholar.git
Cloning into bare repository 'openscholar.git'...
remote: Counting objects: 167069, done.
remote: Compressing objects: 100% (51806/51806), done.
remote: Total 167069 (delta 112936), reused 166304 (delta 112255)
Receiving objects: 100% (167069/167069), 82.77 MiB | 650 KiB/s, done.
Resolving deltas: 100% (112936/112936), done.
murphy:tmp pdurbin$ cd openscholar.git
murphy:openscholar.git pdurbin$ git remote add github [email protected]:pdurbin/openscholar.git
murphy:openscholar.git pdurbin$ git fetch -q && git push -q --mirror github
remote: error: hook declined to update refs/pull/1001/head
remote: error: hook declined to update refs/pull/1001/merge
(snip)
remote: error: hook declined to update refs/pull/957/head
remote: error: hook declined to update refs/pull/957/merge
To [email protected]:pdurbin/openscholar.git
 * [new branch]      1017 -> 1017
(snip)
 * [new branch]      origin/SCHOLAR-3.x-make-1072 -> origin/SCHOLAR-3.x-make-1072
 * [new tag]         SCHOLAR-2-0-BETA1 -> SCHOLAR-2-0-BETA1
(snip)
 * [new tag]         SCHOLAR-3.1.6 -> SCHOLAR-3.1.6
 ! [remote rejected] refs/pull/1001/head -> refs/pull/1001/head (hook declined)
 ! [remote rejected] refs/pull/1001/merge -> refs/pull/1001/merge (hook declined)
(snip)
 ! [remote rejected] refs/pull/957/head -> refs/pull/957/head (hook declined)
 ! [remote rejected] refs/pull/957/merge -> refs/pull/957/merge (hook declined)
error: failed to push some refs to '[email protected]:pdurbin/openscholar.git'
murphy:openscholar.git pdurbin$ 
git
  • 2 2 个回答
  • 1683 Views

2 个回答

  • Voted
  1. Christoph Rüegg
    2013-02-01T11:54:09+08:002013-02-01T11:54:09+08:00

    关于输出中的错误消息:

    您可能希望从您的镜像中排除拉取请求引用。我最近遇到了类似的问题,但反过来(GitHub 作为源而不是目标),但看起来它可能是相关的:

    http://christoph.ruegg.name/blog/2013/1/26/git-howto-mirror-a-github-repository-without-pull-refs.html

    • 2
  2. Best Answer
    Philip Durbin
    2013-05-22T18:16:48+08:002013-05-22T18:16:48+08:00

    我相信 ceejayoz 在关于 GitHub 员工需要帮助的评论中是正确的。他们建议简单地设置一个占位符,我在https://github.com/iqss/openscholar上做了

    它没有我最初寻找的“镜像”,但我们可以没有它。

    • 1

相关问题

  • 如何使用 Gitosis 删除 Git 存储库

  • Git 和 Mercurial

  • 如何修复 git 中第一次提交的元信息?

  • 如何编辑 git 的历史记录以更正不正确的电子邮件地址/名称 [关闭]

  • git如何控制访问权限

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve