Articles in this section

Connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository

Plesk for Linux ext: git

Applicable to:

  • Plesk for Linux

Symptoms

  • An attempt to enable (clone) remote git repository for a domain via the Git extension for Plesk leads to an error that is similar to the following:

    PLESK_ERROR: Public key for the server at 'github.com' is already known in '/var/www/vhosts/example.com/.ssh/git_known_hosts'. ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

  • A direct request for the repository host returns the same time out error:

    # git clone git@github.com:example_user/example.git
    Cloning into 'example'...
    ssh: connect to host github.com port 22: Connection timed out
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.

    # ssh -T git@github.com
    ssh: connect to host github.com port 22: Connection timed out

Cause

A firewall that resides on a level above your Linux Plesk server blocks outbound connections on port 22 (the default SSH port) and thus prevents the connection to a remote repository server that belongs to github.com.

Resolution

Contact your server provider in order to receive assistance in opening port 22 (the default SSH port) in any firewalls that reside on levels above your server for your server IP addresses, so that you may gain SSH access to the remote repository host.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.