Giter Club home page Giter Club logo

githubhub's Introduction

GithubHub

Use private repository with a free account.

Overview:

This project can encrypt any number of bare git repositories into another git repository which is hosted on Github.com.

How this project work:

  1. Beforehand: There must be a repository called "root" on your Github.

  2. Prepare: After you extract the github.sh from this project into a certain directory(e.g. some_dir). Please use git clone to fetch the root repo from your Github at the same dir contains github.sh. So some_dir looks like: some_dir -- |- github.sh |- root/

Initially the root should be empty besides .git.

Then you should call "./github.sh init" to create pem files and creat leaf/. After this, some_dir looks like this: some_dir -- |- github.sh |- git.private.pem |- git.public.pem |- root/ |- leaf/

All the prepare work is finished!

  1. Usage: Suppose I want to create a project called 'secret' which I would like to put onto Github while nobody else can read it.

Goto leaf/ and create a directory 'secret'. Then goto secret/ and init it as a bare repository: git init --bare. So this git repo will work like a remote one.(A bare repo is a git repo withou index and work space which is often used as center repositroy.)

After that, goto some other directory and git clone the newly created git bare repo: git clone dirs/some_dir/leaf/secret. Great! You are can work as usual now! Add some content and do some change. Then git add && git commit && git push.

This git push will only push all the changes to your local git bare repos. To push the bare repo to your Github. Please use "github.sh push secret". The repo name following push should be exactly same with the directory name under leaf. Remeber this. This process will compress the secret and encrpyt it into a file under root/. Then push the update root to Github. During this process git.public.pem will be used.

Maybe you change the conent under 'secret' from other places with the similar method above and want to fetch the update content to your current PC. Please use "github.sh pull secret". This process will pull the content from Github to root/ and decrypt it into a normal directory under leaf/. During this process git.private.pem will be used.

IMPORTANT:

After the pem files generated with "github.sh init", please take care these *.pem files carefully. Once they are lost, you have no way to decrypt the file on you Github which means you lost them forever!!

githubhub's People

Contributors

anchor89 avatar hdelbert 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

githubhub's Issues

How to recover my local secret repository which is often used as center repositroy when it is missing?

if my local secret repository is missing by accident, How should I recover that?

After running $./github.sh -h, I found this:

[INFO]BASE=/Users/Johnny/code/github/root-test/root
USAGE:
github.sh init
github.sh push|pull repo_name

github.sh init: Create git.private.pem and git.public.pem under ~/keys. Then create leaf directory under this direcotry and git-clone root from Github.
NOTE: A Github repo called root should be created on github.com beforehand.

github.sh push repo_name: Make directory repo_name under leaf/ to an compressed archived file into root/ with the same name.
Then add this archived file to git and push it to remote.

github.sh pull repo_name: Pull the update files from github to root. Decompress file repo_name under root/ to leaf/.

If I re-init a bare secret repo like README.md file suggested, then I use ./github.sh pull secret, It's still not working, the secret folder will be deleted by this pull process.

Please Help!


After several trials, I got what went wrong and fixed it. Here I share my experiences:

  1. manually mkdir root under your root repositroy before you execute $./github.sh push yourRepo
  2. when clone your own root repo hosted on github, make sure it is cloned into the same local place.
  3. manually mkdir leaf when you want to recover your local center repositroy.
  4. if your local center repositroy is moved, this $./github.sh push yourRepo will update everything.

notes: I try this on mac.

BTW: great work!

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.