Git Server Setting on Ubuntu

# Install GIT

$) sudo add-apt-repository ppa:git-core/ppa

$) sudo apt-get update

$) sudo apt-get install git-core

$) git version


# Create an admin account

$) sudo adduser git

$) su – git

$) cd ~

$) mkdir .ssh

$) sudo chmod 700 .ssh

$) cat >> ~/.ssh/authorized_keys

$) chmod 600 ~/.ssh/authorized_keys

$) rm -rf

# Security Settings

$) sudo vi /etc/passwd
(If the message “user id(account) is not in the sudoers file.” shows, see here.)





Now the access is denied.


# Create repository

Login or connect git account to local or remote machine.

$) cd ~

$) mkdir [repo-name].git

$) cd [repo-name].git

If it is a first try,

$) git init –bare –shared

Or there is a being used repository

$) git clone –bare –shared [repo-url]


# Retrieve by client

$) git clone git@[git-repo-url]:test.git


Reference Source :



Git Server Setting on Ubuntu

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s