Reputation: 1521
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?
Upvotes: 0
Views: 2526
Reputation: 10286
What you are looking for is gitolite, which is a Git server. Fedora requires no particular procedure here as opposed to any other Linux distribution.
In essence, gitolite manages your repositories by using SSH access. You create a specific user (namely, git
) to access the repositories, then provide a simple configuration file with user privileges for authorization. You manage authentication by public SSH keys. Creation of repositories and changes of authorization can be performed via a special "administration" repository, while destruction of repositories must be performed manually.
All in all, it is a pretty low-level facility for handling Git repositories. It starts simple but it has a lot of configuration details you can tune. The quick install documentation is pretty straightforward.
In my opinion, gitolite is a good investment also for "local" workgroups. When you have gained confidence with the (very simple) setup procedure, managing repositories becomes a piece of cake.
Upvotes: 2
Reputation: 14875
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.
Upvotes: 3