Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I noticed that says "mirrored from git://" (with a link) and I'd like to do the same. seems like a good write up of the general technique (basically a cron job), but I'm getting some odd errors and I don't see "mirrored from" at (the destinatation). I'd like the source for the mirror to be

Here is the (trimmed) output I'm seeing:

murphy:~ pdurbin$ cd /tmp
murphy:tmp pdurbin$ git clone --mirror
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
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
remote: error: hook declined to update refs/pull/957/head
remote: error: hook declined to update refs/pull/957/merge
 * [new branch]      1017 -> 1017
 * [new branch]      origin/SCHOLAR-3.x-make-1072 -> origin/SCHOLAR-3.x-make-1072
 * [new tag]         SCHOLAR-2-0-BETA1 -> SCHOLAR-2-0-BETA1
 * [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)
 ! [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 ''
murphy:openscholar.git pdurbin$ 
share|improve this question
Looks like it requires Github staff to help.… – ceejayoz Jan 31 '13 at 16:53
I just wrote to to explain my situation. – Philip Durbin Jan 31 '13 at 17:08

Regarding the error messages in your output:

You may want to exclude pull request refs from your mirror. I've recently had a similar issue but the other way round (GitHub as source instead of target), but it looks like it might be related:

share|improve this answer
Thanks, this is very helpful. It's a little off topic but I found your… very helpful too: – Philip Durbin Jan 31 '13 at 20:04
Thanks, glad it helped! – Christoph Rüegg Feb 1 '13 at 7:19
up vote 0 down vote accepted

I believe ceejayoz was right in the comment about GitHub staff needing to help. They suggested simply setting up a placeholder, which I did at

It doesn't have the "mirrored from" I was originally looking for, but we can live without it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.