【问题标题】:GIT Pull doesn't response via sshGIT Pull 不通过 ssh 响应
【发布时间】:2021-10-31 11:56:52
【问题描述】:

你好,我有一个带有 git pull 的 ssh 配置

错误消息:ssh:连接到主机 github.com 端口 5001:连接超时 致命:远端意外挂断 我的 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 pull、git clone、git fetch 时 我没有通过终端从 github 得到任何响应,没有错误消息或其他消息

我的ubuntu

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

我通过 https 尝试但不起作用,我每次都收到消息致命验证失败,但用户和密码在 web github 中有效

【问题讨论】:

  • 我建议 not 在此处使用 host *,因为这将匹配您运行的每个 ssh。选择您想要匹配的特定 GitHub 名称。 (这可能与 current 问题无关,但您正在为自己设置 future 问题。)

标签: git ubuntu github ssh git-pull


【解决方案1】:

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

其次,改变你的网址

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

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

ssh -Tv git@github.com

【讨论】:

    猜你喜欢
    • 2018-07-25
    • 2011-12-28
    • 1970-01-01
    • 2015-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-08
    相关资源
    最近更新 更多