Configuring a Git Client
Learn how to set up a client on your computer to work with a Git repository stored on your hosting.com account. This assumes you already have a repository created and basic Git knowledge.
Microsoft Windows
A popular Git client for Windows is TortoiseGit. You also need Git for Windows installed.
Steps to Install and Configure TortoiseGit
-
Download TortoiseGit:
Visit https://code.google.com/p/tortoisegit.
Click Download TortoiseGit and save the.msifile. -
Install TortoiseGit:
Double-click the.msifile and follow the prompts. -
Download Git for Windows:
Visit http://msysgit.github.io.
Click Download and save the.exefile. -
Install Git for Windows:
Double-click the.exefile and follow the prompts.
Note:
TortoiseGit may detect existing PuTTY SSH sessions. You can use TortoisePlink to integrate TortoiseGit with your existing PuTTY sessions.
Cloning a Repository
-
Right-click on the desktop or a folder and select Git Clone.
-
In the URL box, type the repository URL:
ssh://username@example.com/home/username/repository
-
Replace
usernamewith your hosting.com account username. -
Replace
example.comwith your domain name. -
Replace
repositorywith the path to your repository.
Non-standard SSH port:
ssh://username@example.com:7822/home/username/repository
Click OK to clone the repository.
macOS and Linux
The git command line client is typically the fastest way to work with Git, though GUI clients are also available.
Cloning a Repository on a Non-standard Port
Some hosting.com servers use port 7822 instead of 22. To clone using a custom port:
git clone ssh://username@example.com:7822/home/username/repository
-
Replace
username,example.com, andrepositorywith your account details.
Configuring SSH for Easier Access
You can define the SSH port and user in your ~/.ssh/config file:
Host example
Hostname example.com
Port 7822
User username
-
Hostcan be any alias you choose. -
After this, you can clone the repository using the alias:
git clone ssh://example/home/username/repository
Using SSH Keys
To avoid typing a password each time, you can set up SSH keys.
-
For instructions, refer to the guide on setting up SSH keys.
This setup allows you to interact with your hosting.com Git repository efficiently from Windows, macOS, or Linux.