GithubHelp home page GithubHelp logo

gitomatic's Introduction

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>

gitomatic's People

Contributors

muesli avatar rasa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitomatic's Issues

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?

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.

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.

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.