XP-Dev.com Documentation

Git Tutorial

Getting Started

Register an account with XP-Dev.com.

You may want to download & install a Git client at this stage if you don't have one. Here are the recommended Git clients:

Platform Client
Windows Git for Windows
Mac OS X Git OS X Installer
Linux Install from your distribution's package manager
For e.g. on Ubuntu: sudo apt-get install git, or
on CentOS/Fedora: sudo yum install git

Generating a Private/Public Key Pair

You only need to generate a private/public key pair if you intend to use SSH to access your Git repository. You can always use your username and password to access your repository using HTTPS and skip this step entirely.

You'll need to use OpenSSH to generate your private/public key pair (you can skip this if you already have a private/public key):

Platform Instructions
Windows Start Git Bash/Shell, and then run: ssh-keygen -t rsa
Mac OS X Start Terminal, and then run ssh-keygen -t rsa
Linux Start a Shell, and then run ssh-keygen -t rsa

The command above will tell you where your private & public keys have been generated on your hard drive. Open the public key file id_rsa.pub in a text editor, and copy the contents of that file to your XP-Dev.com Account Settings page under SSH Public Keys.

Create a Project & Repository

Once your account setup is complete, click on your dashboard's Projects tab, and create a project by clicking on Create a New Project. Give the project a name and then click on the Create Project button.

Once your project is created, click on the Repository tab, followed by clicking on Create a New Repository.

Give your repository a name, and set the type of repository to Git. For this tutorial, lets call it tutorial-repo. Click on the Save button.

Accessing your repository

There are a couple of ways to access your repository, either using SSH or HTTPS.

Remember: If you're using SSH, you will need to have your public key setup in your account (see above).

Once your repository has been created, you should be redirected to your repository's main page (under your project's Repository tab) select the method you wish to access your repository under URLs, and copy the URL shown to your git client's clone command:

SSH example:

git clone ssh://xp-dev.com/tutorial-repo

HTTPS example:

git clone https://xp-dev.com/git/tutorial-repo

When accessing over SSH, your Git client may ask you to verify our server's SSH fingerprint. It is ca:3f:90:8c:b0:93:c0:bd:00:ad:76:37:fb:8c:65:f4.

If you with to avoid re-entering your username and password when accessing your repository over HTTPS, you can configure Git to remember them.

Feel free to contact us if you need any assistance.