错误在git通过ssh在代理后推Heroku master [英] Error in git push heroku master through ssh behind proxy
问题描述
我是一名大学生(在代理10.3.100.211:8080之后),刚接触ROR,Git& Heroku和一直遵循Ruby on Rails教程。我解决了通过ssh使用以下配置在我的〜/ .ssh / config文件中推送git repo的问题(并且在此之后它完美运行):
主机github.com
主机名ssh.github.com
用户git
ProxyCommand corkscrew 10.3.100.211 8080%h%p
端口443
问题: 在 https://devcenter.heroku.com/articles/git 上使用heroku进行在线应用部署,我得到以下错误: 我的当前状态是: $ git remote -v 任何人都可以通过github.com帮助我,例如将heroku.com的设置写入我的〜/ .ssh / config文件,以便通过使用PORT 443/22的代理后面的ssh实现无缝连接。 任何帮助将受到高度赞赏。 更新(更多信息) 配置:
$ git push heroku master
ssh:连接到主机heroku.com端口22:连接被拒绝
致命:远程终端意外挂断
heroku git@heroku.com:deep-dusk-1030.git(fetch)
heroku git@heroku.com:deep-dusk-1030.git(push)
origin git@github.com:sha ileshgupta / testapp.git(fetch)
origin git@github.com:shaileshgupta / testapp.git(push)
I尝试以下设置并出现以下错误:
主机heroku.com
主机名ssh.heroku.com
用户git
ProxyCommand corkscrew 10.3.100.211 8080%h%p
端口443
错误:
$ git push heroku master
ssh_exchange_identification:由远程主机关闭的连接
致命:远程终端意外挂起
另一个配置:
主机github.com,他roku.com
主机名ssh.github.com
用户git
ProxyCommand corkscrew 10.3.100.211 8080%h%p
端口443
错误:
$ git push heroku master
错误:找不到存储库。
fatal:远程终端意外挂起
解决方案在你的.ssh / config中写下:
主机git_heroku
主机名heroku.com
用户git
ProxyCommand corkscrew 10.3.100.211 8080%h%p
Port 443
和在您的.git / config中更改
git@heroku.com
到
git_heroku
$ c $$ bcode> [remoteappname]
url = git_heroku:appname.git
fetch = + refs / heads / *:refs / remotes / appname / *
git_heroku
是别名;您需要更改您的git配置以使用该别名。Brief Context:
Hi, I am a university student (behind proxy 10.3.100.211:8080), new to ROR, Git & Heroku and have been following Ruby on Rails tutorial. I solved the problem of pushing git repo through ssh using following config in my ~/.ssh/config file (and it worked perfectly after that):Host github.com Hostname ssh.github.com User git ProxyCommand corkscrew 10.3.100.211 8080 %h %p Port 443
Problem:
However, on following https://devcenter.heroku.com/articles/git to use heroku for online app deployment, I am getting following error:
$git push heroku master ssh: connect to host heroku.com port 22: Connection refused fatal: The remote end hung up unexpectedly
My current status is: $ 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)
Can anyone help me with github.com like settings for heroku.com to be written in my ~/.ssh/config file for seamless connection through ssh behind proxy using PORT 443/22.
Any help will be highly appreciated.
Update (Some More Information) I tried following settings and got following errors:
Configuration:
Host heroku.com Hostname ssh.heroku.com User git ProxyCommand corkscrew 10.3.100.211 8080 %h %p Port 443
Error:
$ git push heroku master ssh_exchange_identification: Connection closed by remote host fatal: The remote end hung up unexpectedly
Another Configuration:
Host github.com, heroku.com Hostname ssh.github.com User git ProxyCommand corkscrew 10.3.100.211 8080 %h %p Port 443
Error:
$ git push heroku master ERROR: Repository not found. fatal: The remote end hung up unexpectedly
解决方案In your .ssh/config write this :
Host git_heroku Hostname heroku.com User git ProxyCommand corkscrew 10.3.100.211 8080 %h %p Port 443
and in your .git/config change
git@heroku.com
to
git_heroku
The full line for a remote will look something like:
[remote "appname"] url = git_heroku:appname.git fetch = +refs/heads/*:refs/remotes/appname/*
git_heroku
is an alias; you need to change your git config to use that alias.这篇关于错误在git通过ssh在代理后推Heroku master的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!