GithubHelp home page GithubHelp logo

gitea-mirror-manager's Introduction

Gitea Mirror Manager

This script uses Gitea's API to manage remote push mirrors for local repositories.

I recently installed Gitea and like to keep my dotfiles and some other projects synced between local, GitHub and GitLab.

After realizing that GitHub and GitLab's API Keys expire and I would have to update every mirror on a regular basis, someone mentioned that automating this may be a good idea.

Herein lies my attempt.

Usage

The script uses Python's builtin modules so no external dependencies are required.

I organize my repositories in Organizations (Gitea, GitHub) and Groups (GitLab) and this script manages the mirrors using that layout.

Create API keys in Gitea, GitHub and GitLab - or wherever you want to push to.

Copy settings.json.example to settings.json and edit it accordingly.

Add any repositories you do not want to sync to the gitea_ignore_sync section.

What it doesn't do

It may or may not work without Organization/Group repository structure.

It doesn't check if a mirror exists - It will delete any existing push mirrors and re-create them.

It doesn't check if the remote repository exists - It will create the remote mirrors but GitHub will have errors in the Web UI and GitLab will create a private repository if it does not exist.

It doesn't verify your API keys for GitHub or GitLab.

It doesn't check ignore repository group/orginazation. Currently, it just uses the repository name to ignore.

It doesn't handle Exceptions like it probably should.

These features may or may not be added in the future - time permitting.

Any pull requests improving the code and/or performance are welcomed.

What it does do

Exactly what I needed it to -- update GitHub/GitLab API keys on my Gitea push mirrors :)

Links

gitea-mirror-manager's People

Contributors

chuckn246 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.