Heroku应用程序无法推送

时间:2013-09-16 20:24:48

标签: django git heroku

我尝试部署我的第一个heroku代码,但是当我运行git push heroku master时,我收到错误:

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

Please make sure you have the correct access rights
and the repository exists.

git remote -v给出,

heroku  git@heroku.com:dry-stream-5959.git (fetch)
heroku  git@heroku.com:dry-stream-5959.git (push)

问题是什么?为什么不部署代码?

3 个答案:

答案 0 :(得分:2)

我发现git push heroku master引用" github.com" 如果您必须推送到heorku.com,请尝试:

git remote set-url heroku git@heroku.com:dry-stream-5959.git

然后重复git push 如果问题仍然存在,并且ssh端口被阻止,则遵循aforementioned link,但将github.com替换为heroku.com

答案 1 :(得分:0)

SSH可能在端口22上被阻止。

结帐this answer,它可能对您有帮助。

答案 2 :(得分:0)

通常有用的是:

ssh -vvv yourlogin@heroku

以便在ssh通信期间发生所有操作。

各种原因可以归结为这些原因,

    来自$ HOME的
  • 未正确定义(通常在Windows上使用 环境变量%HOME%默认情况下根本没有定义)
  • 到SSH守护程序的IP冲突地址(请参阅此线程)。

另见answer:// Unable to Git-push master to Github

相关问题