I ran into some issues trying to mirror a repository on Github. This Gist outlines what changes were needed to get it working.
I was attempting to follow these instructions: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/duplicating-a-repository#mirroring-a-repository-in-another-location
The problem was that the pull refs from Github generate error/warnings (and lots of them). Here is more about that: https://christoph.ruegg.name/blog/git-howto-mirror-a-github-repository-without-pull-refs.html
After issueing the git clone --mirror call I ran the following command to remove the pull request refs: git show-ref | cut -d' ' -f2 | grep 'pull' | xargs -r -L1 git update-ref -d
I ended up alterning my git config -e
to the following:
[core]
repositoryformatversion = 0
filemode = true
bare = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://github.com/rx/presenters
fetch = +refs/heads/*:refs/heads/*
fetch = +refs/tags/*:refs/tags/*
mirror = true
[remote "mirrors"]
url = https://github.com/coprl/coprl
mirror = true
skipDefaultUpdate = true
So now I can keep the mirror up to date:
git remote update git push mirrors
You can probably use the steps in the Github guide just as well, I just liked the syntax above better.