Using a 1and1 git repository
Using a 1and1 git repository


On the 1and1 business accounts you can now use Git via SSH. Here is how…

Setup your master FTP password (which will be used for SSH).

# SSH into your 1and1 account with (assuming example.com is on this account): 
$ ssh username@example.com
$ mkdir repositories
$ cd repositories
$ git init --bare my_repo.git

# Now on your local machine you can clone this repository with:  
$ git clone ssh://username@example.com/~/repositories/my_repo.git

# Or to add 1and1 as a remote location for an existing repository do:  
$ git remote add origin ssh://username@example.com/~/repositories/my_repo.git

Enjoy…