A tool to monitor git repositories and automatically pull & push changes

Overview

git-o-matic

A tool to monitor git repositories and automatically pull & push changes

Installation

Packages & Binaries

From Source

Make sure you have a working Go environment (Go 1.11 or higher is required). See the install instructions.

Compiling gitomatic is easy, simply run:

git clone https://github.com/muesli/gitomatic.git
cd gitomatic
go build

Usage

Monitor a repository for changes and automatically pull & push changes:

gitomatic <path>

2019/08/03 00:16:48 Checking repository: /tmp/gitomatic-test/
2019/08/03 00:16:48 Pulling changes...
2019/08/03 00:16:49 New file detected: hello_world.txt
2019/08/03 00:16:49 Adding file to work-tree: hello_world.txt
2019/08/03 00:16:49 Creating commit: Add hello_world.txt.
2019/08/03 00:16:49 Pushing changes...
2019/08/03 00:16:53 Sleeping until next check in 10s...
2019/08/03 00:17:03 Checking repository: /tmp/gitomatic-test/
2019/08/03 00:17:03 Pulling changes...
2019/08/03 00:17:07 Deleted file detected: hello_world.txt
2019/08/03 00:17:07 Removing file from work-tree: hello_world.txt
2019/08/03 00:17:07 Creating commit: Remove hello_world.txt.
2019/08/03 00:17:07 Pushing changes...

Auth methods:

gitomatic -privkey ~/.ssh/id_rsa <path>
gitomatic -username "someone" -password "mypass" <path>

If you want to pull new changes but don't create commits (or vice versa):

gitomatic -pull=true -push=false <path>

You can control how often gitomatic checks for changes:

gitomatic -interval 30m <path>

Change the commit author's name and email:

gitomatic -author "John Doe" -email "[email protected]" <path>
Issues
  • Setting email / author fails.

    Setting email / author fails.

    opened by thebetterjort 1
  • Key Types are Unrecognized

    Key Types are Unrecognized

    Hey, I've tried for about an hour but I can't get any combination of keys/settings working. Can anyone provide an example of a working configuration?

    Here's one I tried that does not work, for instance:

    ssh-keygen -t ecdsa -b 521 -C "[email protected]"
    # Add key to GitHub
    gitomatic -privkey ~/.ssh/id_ecdsa_gitomatic ./
    

    Shows this error:

    git-o-matic
    cannot parse key: ssh: unhandled key type
    

    This project is pretty cool but is not working ATM.

    opened by ProfessorManhattan 0
  • Cant run without privkey existing and not working for public github repos

    Cant run without privkey existing and not working for public github repos

    So I have two issues, firstly on a brand new ubuntu box with a user who has no key running the tool gives me the error:

    cannot parse key: open /root/.ssh/id_rsa: no such file or directory
    

    I tried passing in garbage but it says that its not a valid pem.

    After generating a key at the expected location and trying to use this on a public git repo it won't work. I tried adding a fake username and password but it just says:

    cannot pull from repository: authentication required
    

    Is it possible to allow a no-auth option and just let git try seeing as its already setup to be able to pull public https repos?

    opened by madhavajay 2
  • Error cannot pull from repository

    Error cannot pull from repository

    So, I have been interested to use git-o-matic to deploy some internal network containers using git-hooks automatically.

    The way I have in mind is using git-o-matic to automatically pull changes in my develop branch and use my post-merge hooks (Already working) to restart the container with said new code.

    My problem is I keep getting the following message:

    2020/02/17 15:04:57 Checking repository: .
    2020/02/17 15:04:57 Pulling changes...
    cannot pull from repository: non-fast-forward update
    

    The way I am launching it in my server is:

    gitomatic -privkey <path-to-my-deploy-key> -pull=true -push=false <path-to-my-local-repo> 
    

    Any help regarding getting this to work would be appreciated.

    bug 
    opened by deadpyxel 7
  • Check before exit when an interrupt is received

    Check before exit when an interrupt is received

    This PR changes the program to do one final pull and push before exiting the process when an interrupt is received.

    The use case I have is as follows: I have a simple script which opens a texteditor to edit notes and uses a forked gitomatic to push any changes. When the editor closes, I terminate gitomatic, however that means changes won't be pushed by gitomatic until the next run.

    opened by lwakefield 4
  • Add ability to not commit when on certain branches

    Add ability to not commit when on certain branches

    It would be nice to have a few protected branches passable as command line options. Something so that I can just leave this running and don't commit to a release branch a bunch accidentally.

    opened by ClashTheBunny 3
Releases(v0.2)
Owner
Christian Muehlhaeuser
Geek, Gopher, Software Developer, Maker, Opensource Advocate, Tech Enthusiast, Photographer, Board and Card Gamer
Christian Muehlhaeuser
A simple Git Notes Key Value store

Gino Keva - Git Notes Key Values Gino Keva works as a simple Key Value store built on top of Git Notes, using an event sourcing architecture. Events a

Philips Software 23 Jan 19, 2022
This is a mongodb data comparison tool.

mongo-compare This is a mongodb data comparison tool. In the mongodb official tools, mongodb officially provides a series of tools such as mongodump,

null 31 May 8, 2022
Nipo is a powerful, fast, multi-thread, clustered and in-memory key-value database, with ability to configure token and acl on commands and key-regexes written by GO

Welcome to NIPO Nipo is a powerful, fast, multi-thread, clustered and in-memory key-value database, with ability to configure token and acl on command

Morteza Bashsiz 16 Jun 13, 2022
Owl is a db manager platform,committed to standardizing the data, index in the database and operations to the database, to avoid risks and failures.

Owl is a db manager platform,committed to standardizing the data, index in the database and operations to the database, to avoid risks and failures. capabilities which owl provides include Process approval、sql Audit、sql execute and execute as crontab、data backup and recover .

null 35 Jun 17, 2022
Being played at The Coffee House and try to find and play it on Spotify

The Coffee House Muzik Follow the music that is being played at The Coffee House and try to find and play it on Spotify. Installation Clone this proje

SangND 4 May 25, 2022
Walrus - Fast, Secure and Reliable System Backup, Set up in Minutes.

Walrus is a fast, secure and reliable backup system suitable for modern infrastructure. With walrus, you can backup services like MySQL, PostgreSQL, Redis, etcd or a complete directory with a short interval and low overhead. It supports AWS S3, digitalocean spaces and any S3-compatible object storage service.

Ahmed 443 Aug 11, 2022
🔑A high performance Key/Value store written in Go with a predictable read/write performance and high throughput. Uses a Bitcask on-disk layout (LSM+WAL) similar to Riak.

bitcask A high performance Key/Value store written in Go with a predictable read/write performance and high throughput. Uses a Bitcask on-disk layout

James Mills 7 Apr 15, 2022
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support

BuntDB is a low-level, in-memory, key/value store in pure Go. It persists to disk, is ACID compliant, and uses locking for multiple readers and a sing

Josh Baker 3.8k Aug 7, 2022
Concurrency-safe Go caching library with expiration capabilities and access counters

cache2go Concurrency-safe golang caching library with expiration capabilities. Installation Make sure you have a working Go environment (Go 1.2 or hig

Christian Muehlhaeuser 1.8k Aug 17, 2022
groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases.

groupcache Summary groupcache is a distributed caching and cache-filling library, intended as a replacement for a pool of memcached nodes in many case

Go 11.6k Aug 8, 2022
Scalable datastore for metrics, events, and real-time analytics

InfluxDB InfluxDB is an open source time series platform. This includes APIs for storing and querying data, processing it in the background for ETL or

InfluxData 23.9k Aug 8, 2022
Kivik provides a common interface to CouchDB or CouchDB-like databases for Go and GopherJS.

Kivik Package kivik provides a common interface to CouchDB or CouchDB-like databases. The kivik package must be used in conjunction with a database dr

Kivik 239 Jun 23, 2022
A simple, fast, embeddable, persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list, set, sorted set.

NutsDB English | 简体中文 NutsDB is a simple, fast, embeddable and persistent key/value store written in pure Go. It supports fully serializable transacti

徐佳军 2.4k Aug 18, 2022
The Prometheus monitoring system and time series database.

Prometheus Visit prometheus.io for the full documentation, examples and guides. Prometheus, a Cloud Native Computing Foundation project, is a systems

Prometheus 43.8k Aug 14, 2022
Fast and simple key/value store written using Go's standard library

Table of Contents Description Usage Cookbook Disadvantages Motivation Benchmarks Test 1 Test 4 Description Package pudge is a fast and simple key/valu

Vadim Kulibaba 328 Aug 11, 2022
Fast specialized time-series database for IoT, real-time internet connected devices and AI analytics.

unitdb Unitdb is blazing fast specialized time-series database for microservices, IoT, and realtime internet connected devices. As Unitdb satisfy the

Saffat Technologies 94 Aug 2, 2022
VictoriaMetrics: fast, cost-effective monitoring solution and time series database

VictoriaMetrics VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and time series database. It is available in binary release

VictoriaMetrics 6.9k Aug 13, 2022
The MySQL Cluster Autopilot Management with GTID and Raft

Xenon Overview Xenon is a MySQL HA and Replication Management tool using Raft protocol. Xenon has many cool features, such as: Fast Failover with no l

RadonDB 618 Jul 26, 2022
Multitiered file storage API built on Filecoin and IPFS

Powergate Powergate is a multitiered file storage API built on Filecoin and IPFS, and an index builder for Filecoin data. It's designed to be modular

textile.io 353 Aug 9, 2022