Install gitolite
Gittolite is a nice tool to manage access and git repositories with an additional admin-repository.
Server Site
Install the port by:
cd /usr/ports/devel/gitolite/
make install
make clean
Now we create the home dir of the git user:
mkdir /usr/local/git
chown git:git /usr/local/git
Set a password for the user git:
passwd git
Client Site
Now we copy our public key to the server with:
scp ~/.ssh/id_rsa.pub git@server:name.key
Now login with the user git and ssh:
ssh -o PubkeyAuthentication=no git@server
Now we setup the gitolite repo:
gitolite setup name.key
exit vi without modification on the file.
exit
Checkout the admin repository with:
git clone git@server:gitolite-admin
Do your modification, commit it and push it back to the server.
Move existing repo to gitolite
At first we create a new repo using the gitolite mechanism by editing the file gitolite.conf from the cloned gitolite-admin repository:
repo newrepo
RW+ = user
Commit this change and push it to the server.
Now we can push our existing repo into gitolite. Go to the repo you want to push into your gitolite managed repos and insert:
git push --all git@server:newrepo
Upgrade Gitolite v3
Upgrade gitolite using normal FreeBSD upgrade (portmaster or portupgrade). After this is finished we have to upgrade the hook scripts.
Login into the server with the git account:
ssh -o PubkeyAuthentication=no git@server
Upgrade with:
gitolite setup
That’s it.
EMail Notifier
gem install git-commit-notifier
Jun 12 | Convert SVN to GIT | 1 min read |
Jun 11 | Convert CVS to Git | 2 min read |
Dec 16 | GIT and SVN | 3 min read |
Dec 16 | Using GIT as Central Repository on a Server | 1 min read |