GIT 拉取不通过 ssh 响应

GIT Pull doesn't response via ssh

你好,我有一个带有 git pull

的 ssh 配置

错误消息:ssh:连接到主机github.com 端口 5001:连接超时 fatal: 远端意外挂断 我的 ssh 配置

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

我的.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

我将 ssh 密钥添加到设置 > 将密钥部署到我的 github 帐户

我尝试 git status 工作正常,但是 当我尝试 git 拉取、git 克隆、git 获取时 我没有通过终端从 github 收到任何响应,没有错误消息或其他消息

我的ubuntu

分销商 ID:Ubuntu 说明:Ubuntu 12.04.4 LTS 发布:12.04 代号:精确

我尝试通过 https 但不起作用,我每次都收到消息 fatal autentication failed,但用户和密码在网络中有效 github

首先,在您的 ssh 配置中,添加 Port 22 以确保在端口 22(而不是 5001)上联系 GitHub。

其次,将您的 URL 更改为

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

第三,先测试一下你的public键~/.ssh/id_qch.pub是否注册了,用

ssh -Tv git@github.com