(To) Mirror Emacs Lisp package archives. Used to create and maintain mirrors under Git repository.
Available mirrors:
Note that currently only GitLab and GitHub are supported out of box as a remote
for the mirror. Though you can use mirror-elpa to maintain local mirror or
mirror on any other Git hosting. See Usage section for more information.
The following software must be installed on your system:
- Git
- Emacs
- rsync
In order to use mirror-elpa script, you need to prepare configuration file.
You can do it manually or use configure script provided by this repository.
Example of configuration file:
mirror_path="$XDG_CACHE_HOME/elpa-mirror"
mirror_host="github.com"
mirror_owner="d12frosted"
mirror_repo="elpa-mirror"
access_login="$ACCESS_LOGIN"
access_token="$ACCESS_TOKEN"
commit_name="Golem"
commit_email="golem@d12frosted.io"
elpa_clone_path="$XDG_CACHE_HOME/elpa-clone"
function git_config_hook {
git config commit.gpgsign false
}Some explanations:
mirror_pathis location of mirror repository on your disk.mirror_host,mirror_ownerandmirror_repoused to build url to your remote mirror repository. Repository URL is build like this:mirror_url="https://${access_login}:${access_token}@${mirror_host}/${mirror_owner}/${mirror_repo}.git"access_loginis user with access to repository.access_tokenis password/secret/token that is used for authentication. On GitHub and GitLab you can create access tokens and use them (which is recommended).commit_nameandcommit_emailused as committer information.elpa_clone_pathis location ofelpa_clonescript for Emacs.
The configuration wizard is not maintained, but you can give it a try, as it should help you with token creation.
./configure$ ./configure
$ make installYou can also specify how often to sync mirror when running make install
(defaults to every 4 hours) and location to resulting configuration file
(defaults to $XDG_CONFIG_HOME/mirror-elpa.sh:
$ make install SCHEDULE="0 0 * * *" CONFIG_FILE="~/mirror-elpa.sh"SCHEDULE can be set to any valid CRON expression.
- Desmond O. Chang, thanks for elpa-clone.
- Filipe Silva, thanks for keeping this project alive.
- Alyssa Ross, thanks for humans project that inspired me for improving my existing scripts into this project.
If you enjoy this project, you can support its development via GitHub Sponsors or Patreon.