https://github.com/jhnc-oss/github-mirror
Repository mirror automation.
https://github.com/jhnc-oss/github-mirror
git git-mirror github github-mirror github-mirrors
Last synced: about 1 year ago
JSON representation
Repository mirror automation.
- Host: GitHub
- URL: https://github.com/jhnc-oss/github-mirror
- Owner: jhnc-oss
- License: mit
- Created: 2021-08-18T08:28:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-19T20:51:41.000Z (about 1 year ago)
- Last Synced: 2025-02-19T21:31:56.933Z (about 1 year ago)
- Topics: git, git-mirror, github, github-mirror, github-mirrors
- Homepage:
- Size: 69.3 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# GitHub Mirror
[](https://github.com/jhnc-oss/github-mirror/actions/workflows/mirror.yml)
[](LICENSE)
Mirrors repositories to GitHub.
**Note:** Action runs on branches other than `main` execute a dry run and wont update the remote repository.
## Add Mirror
:warning: *All branches which aren't in the upstream repository are lost*.
1. Create a **fork** (if on GitHub) or an **empty destination repository**, same name as upstream is recommended
2. **Generate SSH keys**: `ssh-keygen -t ed25519 -C github-mirror`
- Add the *private* key as a new secret to this project (`SSH_PRIVATE_KEY_`, all uppercase)
- Add the *public* key as *writeable* deployment key `github-mirror` to the destination repository
3. **Add configuration** to [`mirror.yml`](./.github/workflows/mirror.yml)
4. *(Optional)* **Set default branch** of the destination repository according to upstream
### Example
```yml
mirror_config:
- {
src_repo: "",
dest_repo: "",
key_id: "",
}
- ...
```