Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git push heroku master出现错误ssh:连接到主机heroku.com端口22:连接被拒绝_Heroku - Fatal编程技术网

git push heroku master出现错误ssh:连接到主机heroku.com端口22:连接被拒绝

git push heroku master出现错误ssh:连接到主机heroku.com端口22:连接被拒绝,heroku,Heroku,我正在尝试运行heroku django教程(使用Ubuntu12.04),但出于某种原因,我似乎无法进入heroku。发生的情况如下: yeinhorn@ubuntu:~/hellodjango$ git init Reinitialized existing Git repository in /home/yeinhorn/hellodjango/.git/ yeinhorn@ubuntu:~/hellodjango$ git add . yeinhorn@ubuntu:~/hellodja

我正在尝试运行heroku django教程(使用Ubuntu12.04),但出于某种原因,我似乎无法进入heroku。发生的情况如下:

yeinhorn@ubuntu:~/hellodjango$ git init
Reinitialized existing Git repository in /home/yeinhorn/hellodjango/.git/
yeinhorn@ubuntu:~/hellodjango$ git add .
yeinhorn@ubuntu:~/hellodjango$ git commit -m "my first commit"
# On branch master
nothing to commit (working directory clean)
yeinhorn@ubuntu:~/hellodjango$ heroku create
Creating high-dusk-6308... done, stack is cedar
http://high-dusk-6308.herokuapp.com/ | git@heroku.com:high-dusk-6308.git
 !    New default stack: Cedar. To use Bamboo, run `heroku create -s bamboo`.
yeinhorn@ubuntu:~/hellodjango$ git remote -v
heroku  git@heroku.com:blazing-dusk-8587.git (fetch)
heroku  git@heroku.com:blazing-dusk-8587.git (push)
yeinhorn@ubuntu:~/hellodjango$ git push heroku master
ssh: connect to host heroku.com port 22: Connection refused
fatal: The remote end hung up unexpectedly
yeinhorn@ubuntu:~/hellodjango$ git push -f heroku
ssh: connect to host heroku.com port 22: Connection refused
fatal: The remote end hung 
出人意料地

当我跑步的时候

$telnet heroku.com 22
我明白了


有什么想法吗?

基于和,我建议您检查您是否没有运行任何防火墙或端口阻止软件(如PeerGardian),以及您是否正在阻止系统上任何位置的Amazon/EC2。

执行以下步骤:1。检查sshd服务:

$ ssh-keygen -t rsa   # created ssh key
$ heroku keys:add   # upload ssh key
$ heroku keys  # lists keys
二,。查找普通代理节点

$ ssh -vvv heroku.com  # debug ssh connection
$ vim ~/.ssh/config   # setup usefull proxy node
  Host heroku.com
  Hostname 107.21.95.3     # trans by ip
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_rsa
  port 22

请在代码块中设置复制粘贴终端输出的格式。见:谢谢你的建议。我来自中国,这里的许多程序员都遭受了GFW(长城防火墙)的问题。正如您所说,通过设置ssh配置文件,我已经解决了连接超时问题。但是我想知道你是如何知道107.21.95.3是可用的,你是如何得到那个ip的,那个ip代表什么,如果那个ip在将来不可用,我怎么能找到另一个。我会一直在这里,你可以跟随它
$ ssh -vvv heroku.com  # debug ssh connection
$ vim ~/.ssh/config   # setup usefull proxy node
  Host heroku.com
  Hostname 107.21.95.3     # trans by ip
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_rsa
  port 22