Giter Club home page Giter Club logo

gitea-mirror-reauth's Introduction

gitea-mirror-reauth

As Gitea does not provide a simple way to modify the authorization information of mirrored repositories, I wrote this tool to solve this problem.

Installation

go install github.com/TBXark/gitea-mirror-reauth@latest

Usage

gitea-mirror-reauth
expected 'preview', 'auto-replace' or 'token-replace' subcommands
Usage:
  preview       preview all gitea repositories
  auto-replace  auto replace gitea repositories token by config
  token-replace replace gitea repositories token manually

preview

Check all the repositories in gitea-repositories and output the repository information

Usage of preview:
  -gitea-dir string
        gitea repositories dir (default "/home/git/data/gitea-repositories")
  -help
        help

auto-replace

Replace the token in the repository according to the configuration file

Usage of auto-replace:
  -config string
        config file path
  -confirm
        confirm
  -gitea-dir string
        gitea repositories dir (default "/home/git/data/gitea-repositories")
  -help
        help

Configuration file is json format, key is regular expression, value is new token.

{
  "regex": "NEW_TOKEN",
  "tbxark/private_repo_name": "NEW_PRIVATE_SCOPE_TOKEN",
  "tbxark/.*": "NEW_PUBLIC_SCOPE_TOKEN"
}

token-replace

Find all the tokens in the repository and replace them

Usage of token-replace:
  -gitea-dir string
        gitea repositories dir (default "/home/git/data/gitea-repositories")
  -help
        help

License

gitea-mirror-reauth is released under the MIT license. See LICENSE for details.

gitea-mirror-reauth's People

Contributors

tbxark 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.