Giter Site home page Giter Site logo

git_sync's Introduction

Git仓同步工具

这是一个用于同步git仓库的工具。

用法

这个项目已经部署到流水线上了,所以clone代码然后修改其中的config.yaml文件再将改动push到主分支上即可完成对同步工具的设置。

设置说明

config.yaml 中分为三个部分,一个是全局配置common,一个是仓库设置repos,还有一个是帐号设置auths

common

common部分是全局设置,在这里可以对同步工具进行全局设置。其设置会应用在每一个repo上面。具体配置说明如下:

名称 类型 描述
frequency string 同步的时间间隔,只能使用cron表达式
is_force bool 是否强制push,这个功能还没完成,目前总是强制push的
is_sync_tags bool 是否同步tag

repos

repos部分是待同步仓库设置,在这里可以设置需要同步的仓库源和目标仓库。repos本身是数组类型的字段,需要将仓库设置以数组的形式写在repos字段中。其中,仓库设置中可以使用全部的全局设置。 具体配置说明如下:

名称 类型 描述
origin string 待同步的仓库。不支持ssh格式的地址
origin_branch string 待同步的仓库分支。
target string 同步到的目的仓库。不支持ssh格式的地址
target_branch string 同步到的目的仓库分支。
其他 common中的全部配置

auths

auths部分是帐号设置,在这里可以设置访问仓库所需要的帐号,帐号顺序越靠前越优先匹配。目前只支持帐号密码的形式。和repos一样,auths也是数组类型的。

名称 类型 描述
group string 需要帐号密码的git组织
username string 组织需要的用户名
password string 组织需要的密码

git_sync's People

Contributors

holooooo avatar

Watchers

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