(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_path
is location of mirror repository on your disk.mirror_host
,mirror_owner
andmirror_repo
used 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_login
is user with access to repository.access_token
is password/secret/token that is used for authentication. On GitHub and GitLab you can create access tokens and use them (which is recommended).commit_name
andcommit_email
used as committer information.elpa_clone_path
is location ofelpa_clone
script 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 install
You 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.