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

  1. Download TortoiseGit:
    Visit https://code.google.com/p/tortoisegit.
    Click Download TortoiseGit and save the .msi file.

  2. Install TortoiseGit:
    Double-click the .msi file and follow the prompts.

  3. Download Git for Windows:
    Visit http://msysgit.github.io.
    Click Download and save the .exe file.

  4. Install Git for Windows:
    Double-click the .exe file 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

  1. Right-click on the desktop or a folder and select Git Clone.

  2. In the URL box, type the repository URL:

ssh://username@example.com/home/username/repository
  • Replace username with your hosting.com account username.

  • Replace example.com with your domain name.

  • Replace repository with 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, and repository with 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
  • Host can 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.


This setup allows you to interact with your hosting.com Git repository efficiently from Windows, macOS, or Linux.

Var dette svaret til hjelp? 0 brukere syntes dette svaret var til hjelp (0 Stemmer)

Powered by WHMCompleteSolution