Bulk add mirror repositories to a Gitea instance by scraping repositories on GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jason Raimondi 5e36320884
Merge pull request #1 from victor141516/master
5 months ago
.github/workflows Fix workflow repository 2 years ago
src Add support for private repos 5 months ago
.dockerignore Initial commit 2 years ago
.gitignore Initial commit 2 years ago
Dockerfile Refactoring to use import_map 2 years ago
LICENSE.md Add license 2 years ago
README.md Document usage, 2 years ago
import_map.json Refactoring to use import_map 2 years ago


Deno Mirror to Gitea

Build Image Size Pulls Version

Bulk add mirror repositories to a Gitea instance by scraping repositories on GitHub.

Mirror repositories are kept up to date automatically by Gitea.


I am a data hoarder.


Pass in the required fields:


By default,

Runtime options

Name Default Value Description
GITHUB_ACCESS_TOKEN create a github access token
GITEA_ACCESS_TOKEN gitea access token
GITEA_API_URL http://localhost:3000/api/v1/ api url
STARRED false mirror the users starred repos
REPOS false mirror the users public repos
CONTRIBUTED_TO false mirror any repo the user has contributed to
FETCH_FOLLOWING false grab all users you are following, and fetch STARRED/CONTRIUBTED_TO/REPOS based on enabled fields, only traverses 1 depth
DRY_RUN true disable sandbox/test-mode and migrate the repos

For the full list of passable runtime variables are located in constants.ts

By passing in a username list of jasonraimondi adamwathan wesbos, deno-mirror-to-gitea will fetch and add the mirror repos from each user depending on the --STARRED=true, --REPOS=true, --CONTRIBUTED_TO=true, --FETCH_FOLLOWING=true flags. In this case, we would be grabbing all of the repos, starred repos, and contributed repos for jasonraimondi, adamwathan, and wesbos. Then we would fetch all of the users that these three are following, and mirror every repo, starred, and contributed to for the users we are following.

Note: when using --FETCH_FOLLOWING=true in combination with the --STARRED=true --REPOS=true and --CONTRIBUTED_TO=true, it is going to exponentially increase the amount of repos you are mirroring

deno run --allow-net --allow-read main.ts \
    --GITEA_API_URL="http://localhost:3000/api/v1/" \
    --STARRED=false \
    --REPOS=false \
    --CONTRIBUTED_TO=false \
    jasonraimondi adamwathan wesbos 

Or use docker!

docker run --rm jasonraimondi/deno-mirror-to-gitea \
    --GITEA_API_URL="http://localhost:3000/api/v1/" \
    --STARRED=false \
    --REPOS=false \
    --CONTRIBUTED_TO=false \
    jasonraimondi adamwathan wesbos

Similar Projects