相关疑难解决方法(0)

Git SSH错误:"连接到主机:错误的文件号"

我按照git指南但在尝试连接到github时遇到了这个奇怪的问题:

$ ssh -v git@github.com
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Documents and Settings/mugues/.ssh/config
debug1: Applying options for github.com
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: connect to address 207.97.227.239 port 22: Attempt to connect timed out without establishing a connection
ssh: connect to host github.com port 22: Bad file number
Run Code Online (Sandbox Code Playgroud)

这是我在.ssh下的配置文件

Host github.com
    User git
    Hostname github.com
    PreferredAuthentications publickey
    IdentityFile "C:\Documents and Settings\mugues\.ssh\id_rsa"
    TCPKeepAlive yes
    IdentitiesOnly yes
Run Code Online (Sandbox Code Playgroud)

任何的想法?

git ssh github

153
推荐指数
5
解决办法
18万
查看次数

通过代理后面的ssh git push heroku master出错

简要背景:
嗨,我是一名大学生(代理10.3.100.211:8080之后),ROR,Git和Heroku的新手,并且一直关注Ruby on Rails教程.我解决了在我的〜/ .ssh/config文件中使用以下配置通过ssh推送git repo的问题(之后它完美地工作):

Host github.com  
Hostname ssh.github.com  
User git  
ProxyCommand corkscrew 10.3.100.211 8080 %h %p  
Port 443  
Run Code Online (Sandbox Code Playgroud)

问题:

但是,在https://devcenter.heroku.com/articles/git上使用heroku进行在线应用程序部署时,我收到以下错误:

$git push heroku master
ssh: connect to host heroku.com port 22: Connection refused  
fatal: The remote end hung up unexpectedly  
Run Code Online (Sandbox Code Playgroud)

我目前的状态是:$ git remote -v

heroku  git@heroku.com:deep-dusk-1030.git (fetch)  
heroku  git@heroku.com:deep-dusk-1030.git (push)  
origin  git@github.com:shaileshgupta/testapp.git (fetch)  
origin  git@github.com:shaileshgupta/testapp.git (push)  
Run Code Online (Sandbox Code Playgroud)

任何人都可以通过github.com帮助我将heroku.com的设置写入我的〜/ .ssh/config文件,以便通过使用PORT 443/22的代理后面的ssh进行无缝连接.

任何帮助将受到高度赞赏.

更新(更多信息) 我尝试了以下设置并遇到以下错误:

组态:

Host heroku.com  
  Hostname ssh.heroku.com  
  User git  
  ProxyCommand corkscrew 10.3.100.211 8080 %h %p  
  Port …
Run Code Online (Sandbox Code Playgroud)

git heroku

11
推荐指数
1
解决办法
4886
查看次数

标签 统计

git ×2

github ×1

heroku ×1

ssh ×1