https://github.com/willguimont/ghback
Backup GitHub repositories locally.
https://github.com/willguimont/ghback
Last synced: 4 days ago
JSON representation
Backup GitHub repositories locally.
- Host: GitHub
- URL: https://github.com/willguimont/ghback
- Owner: willGuimont
- License: mit
- Created: 2022-08-22T17:57:48.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-28T01:20:43.000Z (about 2 years ago)
- Last Synced: 2025-10-18T22:12:37.182Z (9 months ago)
- Language: Elixir
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ghback
Backup GitHub repositories locally.
## Running
1. Create a [new personal access token](https://github.com/settings/tokens/new) with `repo` scope;
2. Create `gh.secret` and put your token inside;
3. Set `GHBACKUP_PATH` env variable to set the backup path;
4. `mix run`
## Docker
Make a ssh key to clone the repositories in the `ssh_keys` folder.
```shell
ssh-keygen -t ed25519 -C "your_email@example.com" -f ./ssh_keys/id_ed25519 -q -N ""
```
Add the key to your GitHub account.
Build and run the docker with:
```shell
docker build -t ghback .
docker run -d --rm -v :/usr/app/backup ghback
```