Search code examples
gitubuntugithubsshgit-pull

GIT Pull doesn't response via ssh


hello i have a ssh config with git pull

ERORR MESSAGE: ssh: connect to host github.com port 5001: Connection timed out fatal: The remote end hung up unexpectedly my ssh config

 host *
 HostName github.com
 IdentityFile ~/.ssh/id_qch
 User git
 IdentitiesOnly yes

My .git/config

 [core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = "ssh://git@github.com:Pagwebsa/qxxx.git"
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

I add the ssh key into settings > deploy keys into my github account

I try git status work fine, but when i try git pull, git clone, git fetch I don't get any response from github via terminal, no error message or another message

My ubuntu

Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise

I try via https but doens't work, i get message fatal autentication failed everytime, but the user and password works in web github


Solution

  • First, in your ssh config, add Port 22 in order to make sure and contact GitHub on port 22 (instead of 5001).

    Second, change your URL by

     ssh://git@github.com/Pagwebsa/qxxx.git
                        ^^^
    

    Third, test first if your public key ~/.ssh/id_qch.pub is registered, with

    ssh -Tv git@github.com