【发布时间】:2013-01-06 00:44:08
【问题描述】:
我在本地机器上有一个 git 存储库,我将它推送到 github 和一个由 HostGator 托管的登台服务器。我跟着this guide 设置了我的登台服务器以允许我推送到它,这在过去运行良好。
在大约一个月没有推送任何内容后,我现在在尝试推送到临时服务器时看到此错误(其中 [hostname] 被我的 url 替换):
ssh: connect to host [hostname] port 22: Operation timed out
fatal: The remote end hung up unexpectedly
git remote -v 显示:
bright [user]@[hostname]:[path to repo] (fetch)
bright [user]@[hostname]:[path to repo] (push)
origin git@github.com:[reponame.git] (fetch)
origin git@github.com:[reponame.git] (push)
我的 .git/config 的相关部分如下:
[remote "[remote in question"]
url = [user]@[hostname]:[path to repo]
fetch = +refs/heads/*:refs/remotes/[remote]/*
值得注意的是,当我ssh 进入此服务器时,我使用端口 2222,但从错误消息中可以看出,git 正在尝试使用端口 22。我认为情况一直如此,即使它工作正常。
我可以采取哪些步骤来确定git push 在我的登台服务器上超时的原因?
【问题讨论】: