【发布时间】:2011-06-23 17:46:06
【问题描述】:
为了设置上下文,我正在尝试使用toto 来设置我的博客。
我做了
$ sudo gem install toto
gem 已正确安装。
Successfully installed rdiscount-1.6.8
Successfully installed toto-0.4.9
2 gems installed
之后,我尝试了
$ git clone git://github.com/cloudhead/dorothy.git myblog
但我收到以下错误
Cloning into myblog...
github.com[0: 207.97.227.239]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
我的 git http 代理设置是正确的
jatin@jatin-ubuntu:~/myblog$ git config --global http.proxy
http://proxy:port
我的 http_proxy 设置也是正确的
jatin@jatin-ubuntu:~$ echo $http_proxy
http://proxy:port/
所以,我把 git 换成了 http,为
$ git clone http://github.com/cloudhead/dorothy.git myblog
它奏效了。
现在,当我执行以下操作时
$ cd myblog
$ heroku create myblog
它工作到这里,我得到了
Creating myblog...... done
Created http://myblog.heroku.com/ | git@heroku.com:myblog.git
Git remote heroku added
但是这里失败了:
$ git push heroku master
然后出现以下错误
ssh: connect to host heroku.com port 22: Connection timed out
fatal: The remote end hung up unexpectedly
我不知道该怎么做,所以在谷歌搜索了一下后,我发现你无法使用 http 将更改推送到 github。
在进一步挖掘时,我发现了这个链接
how-to-use-the-git-protocol-through-a-http-connect-proxy
这表示您可以让防火墙管理员配置代理以允许 CONNECT 连接端口 9418,这是 git 使用的端口。
一旦他们正确配置了代理,您就可以使用 netcat-openbsd 或 socat 等工具进行连接。
我的问题是我是一名学生,我无法解决这个问题,因为我无法联系到管理员。我不知道该怎么办,因为我仍在寻找答案。
【问题讨论】:
标签: ruby-on-rails git proxy github