Creating an official github mirror

后端 未结 4 1414
野的像风
野的像风 2020-12-04 06:17

How do I create a github mirror for an external git repository, such that it appears as \"real mirror\", e.g., as in https://github.com/mirrors?

So far, I set up a m

4条回答
  •  醉梦人生
    2020-12-04 06:45

    I have used a tool called github-backup with moderate success to, if not mirror, at least make a full backup (including issues and other metadata) of a Github user or organization. To quote the README file:

    Each time you run github-backup, it will find any new forks on GitHub. It will add remotes to your repository for the forks, using names like github_torvalds_subsurface. It will fetch from every fork.

    It downloads metadata from each fork. This is stored into a branch named "github". Each fork gets a directory in there, like torvalds_subsurface. Inside the directory there will be some files, like torvalds_subsurface/watchers. There may be further directories, like for comments: torvalds_subsurface/comments/1.

    You can follow the commits to the github branch to see what information changed on GitHub over time.

    The format of the files in the github branch is currently Haskell serialized data types. This is plain text, and readable, if you squint.

    Limitations include:

    • no private repository support
    • no "social" stuff like stars, followers, etc
    • notes to lines of commits are not supported (yet?)
    • issue labels

提交回复
热议问题