Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is that necessary to install Git server if I want to have remote repository access over ssh?

Tags:

git

Could you please explain, do I really need to install git server on the remote machine if I only need to place repository there and access it over ssh?

My ignorance probably starts from misunderstanding some key git operation principle so I would be glad if someone will explain it to me.

I thought that remote server for git is just a place where it stores files pretty much like local folder of my PC and I can have remote server with ssh access to host my repo on it without a need to install git server binaries there.

Is that possible? If not, could you explain me this thing I miss?

like image 893
Vladislav Rastrusny Avatar asked Mar 31 '11 08:03

Vladislav Rastrusny


People also ask

Do I need a git server?

4.1. As described before, you do not need a server. You can just use a file system or a public Git provider, such as GitHub or Bitbucket. Sometimes, however, it is convenient to have your own server, and installing it under Ubuntu is relatively easy. First make sure you have installed the SSH tooling.

How does git work with SSH?

Git uses SSH to establish a secure connection through which it can execute commands. You're passing it in your ssh username, git , and the host to connect to, github.com . So far this is normal SSH. You also pass it the path to look for your Git repository, MY_GIT_USERNAME/PROJECT.

Do you need a remote repository to use git?

You don't need to have a remote repository at all. You can have the full git experience, with commits, branches, merges, rebases, etc, with only a local repository. The purpose of a remote repository (eg, GitHub) is to publish your code to the world (or to some people) and allow them to read or write it.

Which network protocol does not need git to be installed on server?

The Dumb Protocol This protocol is called “dumb” because it requires no Git-specific code on the server side during the transport process; the fetch process is a series of HTTP GET requests, where the client can assume the layout of the Git repository on the server.


1 Answers

All the files required by git to run are stored locally to a checkout (in the .git directory). You could just access your git repository over SSH and effectively treat it like a repository on your local machine, e.g by mounting the remote folder locally.

However, I'm not sure why you'd want to do that. You can't do anything useful without the git binaries installed. If you just wanted to use the repository for private versioning, then you might as well install and run in locally, and back it up with your usual backup methods. If you want to use the repository to collaborate with others, then you need the git binaries available on a server that all your collaborators can access.

There is no meaningful distinction between a git "server" and a git "client". It's a distributed versioning system, which means each checkout is a fully-functioning version repository in its own right.

like image 84
seb Avatar answered Oct 18 '22 12:10

seb