Search code examples
gitfedora16

How install git on my fedora 16 machine to use as own git server?


My team have 3 or 5 person.And we are working locally.

and we decided to choose git server on my laptop so other person can check out...

I have tried something like this:

mkdir gitexample
cd gitexample
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@IP_ADDRESS_OF_SERVER:example.git
git push origin master

But when I run until the :

git remote add origin [email protected]:example.git
git push origin master

I got the message :

[email protected]'s password: 
fatal: 'example.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

Anybody know how to install and config it on fedora? 192.168.1.15 is my ip address.

and When I run:

[root@localhost .ssh]# ssh [email protected]
[email protected]'s password: 
fatal: Interactive git shell is not enabled.
hint: ~/git-shell-commands should exist and have read and execute access.
Connection to 192.168.1.12 closed.

Anything else to make it work?


Solution

  • On the server you have to init a bare repository.

    mkdir example.git
    cd example.git
    git init --bare
    

    After that you'll be able to clone/pull/push from and to the repository.