git-sync-service

command module
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 13 Imported by: 0

README

Git Sync Service

CI Release Go Report Card Go Version License Latest Release

A service for synchronizing Git repositories across different platforms.

Features

  • Multi-platform Git synchronization
  • Scheduled sync with cron support
  • Webhook-based real-time sync
  • RESTful API for manual operations
  • SQLite and MySQL database support

Installation

From Release

Download the latest binary from Releases.

From Source
git clone https://github.com/yi-nology/git-sync-service.git
cd git-sync-service
go build -o git-sync-service .

Usage

# Run the service
./git-sync-service

# Or use make
make run

Configuration

Environment Variables

The following environment variables are required:

Variable Required Description
ENCRYPTION_KEY Yes Encryption key for credential storage (AES-256-GCM). Min 1 byte; keys shorter than 32 bytes are hashed via SHA-256.

Create a .env file from the example:

cp .env.example .env
# Edit .env and set ENCRYPTION_KEY

Generate a secure key:

openssl rand -base64 32
Config File

Create a conf/config.yaml file with your configuration:

server:
  host: "0.0.0.0"
  port: 8890

database:
  driver: sqlite
  source: "data/git-sync.db"

Development

# Install dependencies
go mod tidy

# Run tests
make test

# Build
make build

# Lint (requires golangci-lint)
golangci-lint run

API Documentation

Once the server is running, access the API at http://localhost:8890.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project Stats

Metric Value
Test Files 12
Total Tests 97

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL