How to configure dedicated server?

How do I configure a private remote git repository in a dedicated server?

  • I started using git very recently and still havent setup a remote repository before, so I am totally lost. This is my setup: I have a repository in my local machine, which I want to publish in our dedicated server (outside the local network). How do I setup a remote git repository in this server, with a security config and whatever else is necessary? Edit: this would be a private repository, so only me and a few people can access it. I guess there are a lot of ways to go about this, so please explain the easiest solution that meets these requirements.

  • Answer:

    The way I do this is to first add a user 'git' to the remote server - then mkdir project.git, cd project.git and then initialize a bare repository with git init --bare then on the local machine: git remote add origin [email protected]:project.git followed by: git push origin master hope that helps

ooops at Server Fault Visit the source

Was this solution helpful to you?

Other answers

An alternative is to use http://sitaramc.github.com/gitolite/master-toc.html which provides access control on top of git. It will save you the headache of having to create and configure access for each user on the server. If like github then you can use http://gitlabhq.com/ (which uses gitolite) to manage your repos via the web. All in all they will both save you the headache of having to manage users server side. Hope this helps

Nicholas Karonji

I believe an answer has already been posted here that will help you, please look at http://serverfault.com/questions/170048/create-ssh-user-with-limited-privileges-to-only-use-git-repository

Tim

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.