Setting GIT on need to know bases

Create an SSH public/private key pair

 [user@client ~]$ ssh keygen -t rsa

Upload the public key to the server

 [user@client ~]$ scp ~/.ssh/

SSH to the server and become root

[user@client ~]$ ssh
user@server:~$ sudo su -

Install gitolite

 root@server:~# apt-get install gitolite

Switch to the gitolite user

 root@server:~# su - gitolite

Run the Gitolite setup script

gitolite@server:~$ gl-setup /tmp/
From your client computer clone the gitolite-admin repository
[user@client ~]$ git clone

   Cloning into gitolite-admin...
   remote: Counting objects: 6, done.
   remote: Compressing objects: 100% (4/4), done.
   remote: Total 6 (delta 0), reused 0 (delta 0)
   Receiving objects: 100% (6/6), done.
   Switch to the gitolite-admin directory

[user@client ~]$ cd gitolite-admin

Create a test repository

[user@client gitolite-admin]$ vim conf/gitolite.conf
... add 

    repo <new-repository-name>

[user@client gitolite-admin]$ git commit -a -m "Add test repository"
[user@client gitolite-admin]$ git a
[master 507045a] Add test repository
 1 files changed, 3 insertions(+), 0 deletions(-)
[user@client gitolite-admin]$ git push
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 376 bytes, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: Already on 'master'
remote: creating test...
remote: Initialized empty Git repository in /var/lib/gitolite/repositories/test.git/
   87cc470..507045a  master -> master

Clone the test repository

[user@client ~]$ git clone
Cloning into test...
warning: You appear to have cloned an empty repository.
Add a README file to the test repository

[user@client test]$ echo "Test Repo" > README
[user@client test]$ git commit -a -m "Initial commit"
[master (root-commit) 4a49ee0] Initial commit
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 README

Push the changes to the server

[user@client test]$ git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 218 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
 * [new branch]      master -> master
git/server.txt · Last modified: 2011/02/19 22:57 by a
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready