SSH超时错误无法从远程存储库读取

时间:2019-06-19 12:19:18

标签: git ssh openssh dokku

我正在尝试将一个项目推向dokku master。我只是在使用dokku设置教程,当我进入此阶段

git push dokku master

我收到一条消息

ssh: connect to host dokku.me port 22: Connection timed out
fatal: Could not read from remote repository

因此,在搜索中,我看到应该将ssh配置文件更改为此

# GITHUB
Host github.com
   Hostname ssh.github.com
    Port 443

这仍然给出相同的错误。

当我使用命令

ssh -T git@github.com

我收到此消息

warning: agent returned different signature type ssh-rsa (expected rsa-sha2-512)
Hi XXXX You've successfully authenticated, but GitHub does not provide shell access.

关于为什么我无法连接到端口22或端口443的任何线索?这是我在家里的本地机器,因此两个端口都不应被阻塞

1 个答案:

答案 0 :(得分:0)

dokku.me主机名是在Dokku文档中用于引用服务器的示例主机名。设置git remote时,应将其替换为服务器的IP地址或关联的主机名。例如:

# dokku docs
git remote add dokku dokku@dokku.me:example-app

# should instead be the following if using a server ip
# replace 10.0.0.2 with your server's IP
git remote add dokku dokku@10.0.0.2:example-app

# or the following if you are using a hostname
git remote add dokku dokku@your-hostname.com:example-app