Showing posts from November, 2012

Create a git server

Git Create a git serverapt-get install gitadduser gitBecome the git user and add team's ssh keys to /home/git/.ssh/authorized_keysChange the git user's shell in /etc/passwd to /usr/bin/git-shell or to whichever path it is otherwise locatedmkdir /opt/gitchown -Rv git.git /opt/gitchmod -Rv g+ws /opt/gitcd /opt/gitmkdir myproject.gitcd myproject.gitgit init --bare --sharedSee addition to /opt/git/myproject.git/config belowmv /opt/git/myproject.git/hooks/post-update.sample /opt/git/myproject.git/hooks/post-updateOn your local computer do:
mkdir ~/tmpcd ~/tmp git config --global "Your Full Name" git config --global initgit add .git commit -m 'initial commit'git remote add origin push origin master
NOTE: if you get an error that origin already exists, do "git remote rm origin" before pushDebug the set up, this guide probably has a few mistakes Add this to /opt/git/myp…