For the moment, we are imposing a limit of one repository per vhost. here is a small example to be tested on your local machine:
$ mkdir {vhost} $ cd {vhost} $ git init $ git remote add origin ssh+git://{login}@git.{datacenter_location}.gpaas.net/{vhost}.git $ mkdir htdocs $ echo "Hello world" > htdocs/index.html $ git add htdocs $ git commit -m "first version of index.html" htdocs $ git push origin master
Once the repository has been created, you will be able to see it in your Simple Hosting administration interface via the tool, gitweb.
For instances using PHP, the root of your repository is not the directory used by the web server. Consequently, in order for all your files to be accessible, you must put them in the directory called htdocs, placed at the root of your repository.
This command will let you copy the repository to your local machine.
$ git clone ssh+git://{login}@git.{datacenter_location}.gpaas.net/{vhost}.git
This command will perform a git checkout in your vhost directory and thus deploy your code. You also have the option of specifying a git object as a tag for example.
$ ssh {login}@git.{datacenter_location}.gpaas.net 'deploy {vhost}.git [ {git_object} ]'
error: unable to unlink old 'htdocs/sites/default/settings.php' (Permission denied)
Additionally, you may clean up your vhost directory. This command will execute a git clean operation on your directory.
$ ssh {login}@git.{datacenter_location}.gpaas.net 'clean {vhost}.git'
If you would like to keep some files or directories, even if they are not followed by git, you will need to add a list of them in a file, .gitignore that is placed in the root directory of your repository. This is useful, for example, if you have files created by your website.
You may either use your usual password to access your repositories (the same as the one you use for your sftp, administration, and SSH console access for example), or add your public SSH key to your disk (more on this).
In order to delete a repository, you can directly delete the directory /lamp0/vcs/git/{vhost}.git (/lamp0/vcs/git/default.git with Node.js and Python instance family) through the sftp.
For these instances, there is a single directory default in your vhosts, as well as a URL like this
ssh+git://{login}@git.{datacenter_location}.gpaas.net/default.git
Each deployment (see the deploy command) will automatically reboot the node process dedicated to getting the requests. The dependencies of your application will also be updated. Additionally, it is no longer necessary to have a htdocs directory like with the PHP instances.
We are going to soon add documentation for accessing Git via Windows by using 'msysgit' : http://msysgit.github.com/
A tutorial exists for this at the following address: http://guides.beanstalkapp.com/version-control/git-on-windows.html
The SSH key fingerprint for the git endpoint is :
35:e0:5a:a9:54:12:55:6b:ce:41:8c:c1:9e:35:1d:f6