Skip to content

fitzgen/mini-meta-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is Mini Meta Git?
===============================================================================

I got tired of trying to make gitosis do what I want it to do, so this is a set
of scripts that do everything I need for my git repository management. I didn't
need any of the fine grained permissions for my repos, I just wanted something
that would authenticate based on ssh public keys. I also happen to have a few
post-receive hooks that need to ssh in to other servers, and gitosis's git user
really doesn't play nice with sshing elsewhere.

Basically, all this adds on top of a normal git server is authentication (NOT
authorization or permissions) via the mini-meta-admin repo, which is just a repo
containing ssh public keys. It let's you take care of the rest without getting
in your way.

Really simple, but that's all I want.


Installation
================================================================================

Creating the git user and authentication repository
--------------------------------------------------------------------------------

$ sudo ./makegituser
$ sudo ./makeauthrepo
$ sudo ./tempinstallfirstkey $PATH_TO_YOUR_KEY.pub

Cloning the authentication repository and permanently adding your public key
--------------------------------------------------------------------------------

$ git clone git@yourdomain.com:mini-meta-admin.git
$ cd mini-meta-admin
$ cp $PATH_TO_YOUR_KEY.pub .
$ git add *
$ git commit -m "Initial commit, adding my public key forreal-sies"
$ git push origin master


Repository Management and Administration
================================================================================

Authentication
--------------------------------------------------------------------------------

To give a user access to your repositories, just add their ssh public key to
your mini-meta-admin repository and run `git push origin master`.

To remove a user's access, just remove their ssh public key from the
mini-meta-admin repo and `git push origin master`.

That is all there is to it.

Adding/Creating Repositories
--------------------------------------------------------------------------------

FIRST create a "repositories" file in your mini-meta-admin repository, if you do
not already have one. Append the names of the repo(s) you wish to create/host to
the "repositories" file on individual lines. Run `git push origin master` to
sync the git user with your mini-meta-admin configurations.

IF YOU ARE CREATING NEW REPOSITORIES you can now checkout the empty repo(s) you
just created, via `git clone git@your_domain.com:your_repo.git`. Make commits,
have fun, `git push origin master`.

IF YOU ARE ADDING EXISTING REPOSITORIES you can now `git remote add REMOTE_NAME
git@your_domain.com:your_repo.git` to add the newly created repo as a remote to
your existing repo, and `git push REMOTE_NAME --all` to sync the new remote with
your repository.

Deleting Repositories
--------------------------------------------------------------------------------

Not yet implemented. Just do it via sudo.

About

Very simple, lightweight git repository authentication and management (because gitosis just gets in my way).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published