simple git-hosting with ubuntu

Posted February 15th 2010 by Julius F

I created a simple instructions for deploying and hosting your own git server:

add new user

adduser --system --shell /bin/sh --home /home/git git
passwd git

create new repository

mkdir -p /home/git/repository/<repo_name>
cd /home/git/repository
git init --bare

prepare your local codes to push

cd /local_path_of_codes
git init
git remote add origin git@<ip>:/repository/<repo_name>
git add .
git commit -a -m "first commit"
git push origin master:refs/heads/master

Comments

blog comments powered by Disqus