通过443端口推送到heroku [英] push to heroku through port 443

查看:124
本文介绍了通过443端口推送到heroku的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用默认端口22,因此根据hartl rails教程设置git和heroku时遇到了困难。



我能够推送在〜/ .ssh / config文件中加入以下内容:


主机名ssh.github.com
PreferredAuthentications publickey
IdentityFile〜/ .ssh / id_rsa
Port 443

但是,类似的条目不适用于heroku:

  Host heroku。 com 
用户git
主机名ssh.heroku.com
PreferredAuthentications publickey
IdentityFile〜/ .ssh / id_rsa
端口443



它似乎挂在这条调试线:

  debug1:identity file / c / Users / [my folder name] /。ssh / id_rsa type 1 



<在这个消息失败之前:

  ssh_exchange_identification:由远程主机关闭的连接。 

我希望得到这个答案,
错误git通过ssh在代理后推送heroku master
它没有工作对我来说......任何建议都可以。

Heroku正在努力提供替代方法将源代码移植到平台上,请看看 heroku push ,例如: https://github.com/ddollar/heroku-push



它使用https,因此不容易受到您遇到的防火墙阻止。



更新



Heroku现在拥有 beta HTTP Git 支持。如果问题是由于您无法在端口22上访问Heroku引起的,那么HTTP Git应该解决它(它可以在端口443上运行)。



要使用HTTP Git,首先确保Toolbelt已更新并且您的凭证是最新的:

  $ heroku更新
$ heroku登录

(这一点很重要,因为Heroku HTTP Git的认证方式与Toolbelt的其余部分略有不同)



在测试版期间,通过将 - http-git 标志传递给相关的 heroku apps:create heroku git:clone heroku git:remote 命令。要创建一个新的应用程序并使用HTTP Git远程进行配置,请运行以下命令:

  $ heroku应用程序:create  - http-git 

要将现有应用程序从SSH更改为HTTP Git,只需从应用程序的目录在你的机器上:

  $ heroku git:remote --http-git 
Git remote heroku已更新

查看 Dev Center文档详细介绍如何为Heroku设置HTTP Git


I am unable to use the default port 22 and so have run into difficulties setting up git and heroku according to the hartl rails tutorial.

I was able to push to git by including the following in the ~/.ssh/config file:

Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

However, a similar entry does not work for heroku:

Host heroku.com
User git
Hostname ssh.heroku.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

It seems to hang at this debug line:

  debug1: identity file /c/Users/[my folder name]/.ssh/id_rsa type 1

...before failing with this message:

  ssh_exchange_identification: Connection closed by remote host.

I had hopes for this answer, Error in git push heroku master through ssh behind proxy it doesn't work for me either...

Any advice would be welcome.

解决方案

Heroku is working on providing alternative ways to move source code onto the platform, take a look at heroku push, for example: https://github.com/ddollar/heroku-push

It uses https and is thus not susceptible to the firewall-blocking you're experiencing.

UPDATE

Heroku now has beta HTTP Git support. If the problem is caused by you being unable to access Heroku on port 22, then HTTP Git should solve it (it works on port 443).

To use HTTP Git, first make sure Toolbelt is updated and that your credentials are current:

$ heroku update
$ heroku login

(this is important because Heroku HTTP Git authenticates in a slightly different way than the rest of Toolbelt)

During the beta, you get HTTP by passing the --http-git flag to the relevant heroku apps:create, heroku git:clone and heroku git:remote commands. To create a new app and have it be configured with a HTTP Git remote, run this:

$ heroku apps:create --http-git

To change an existing app from SSH to HTTP Git, simply run this command from the app’s directory on your machine:

$ heroku git:remote --http-git
Git remote heroku updated

Check out the Dev Center documentation for details on how set up HTTP Git for Heroku.

这篇关于通过443端口推送到heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆