Tobias Aigner

Remote git Repository Over ssh

February 6, 2013

A feature of git I think is useful sometimes is the ability to utilize the ssh protocol. Therefore, it is possible to work with a remote repository by using an existing ssh configuration.

Server-Side

On the server-side a bare repository has to be created

$ mkdir remote-project.git
$ cd remote-project.git
$ git init --bare

Client-Side

In contrast, on the client side it is now possible to clone the remote repository

$ git clone ssh://user@server/path/to/remote-project.git

Afterwards, changes can be pushed to the server:

$ cd remote-project
<add and commit your changes>
$ git push origin master