简体   繁体   English

推送到heroku主服务器时未获得“添加了Git远程heroku”并得到错误:“致命:远程端意外挂起”

[英]Not getting “Git remote heroku added” and getting error: “fatal: The remote end hung up unexpectedly” when pushing to heroku master

I am brand new to Heroku and Ruby on Rails. 我是Heroku和Ruby on Rails的新手。 When I run "heroku create" I do not get "Git remote heroku added". 当我运行“ heroku create”时,我没有得到“添加的Git远程heroku”。 Also, when I try to "git push heroku master" I get "fatal: The remote end hung up unexpectedly". 另外,当我尝试“ git push heroku master”时,我得到“致命消息:远端意外挂断”。 On the sites like Stackflow there are similar situations but with additional error messages. 在类似Stackflow的站点上,也有类似的情况,但带有其他错误消息。 Mine is only "fatal: The remote end hung up unexpectedly". 我的只是“致命的:远端意外挂断”。 I also already edited the gem file. 我也已经编辑了gem文件。 I notice that instead of loading the "first_app" that I'm trying to install, it installs the http: //murmuring-ravine-4822.herokuapp.com | 我注意到,它没有安装我尝试安装的“ first_app”,而是安装了http://murmuring-ravine-4822.herokuapp.com | git@heroku.com:murmuring-ravine-4822.git. git@heroku.com:murmuring-ravine-4822.git。 Please help, Alex 请帮忙,亚历克斯

Try to create your SSH key and upload to Heroku. 尝试创建您的SSH密钥并上传到Heroku。

https://devcenter.heroku.com/articles/keys https://devcenter.heroku.com/articles/keys

Add application to Heroku git remote repository using below command. 使用以下命令将应用程序添加到Heroku git远程存储库。

heroku git:remote -a your-app-name

Then push application to Heroku master repository. 然后将应用程序推送到Heroku主存储库。

Useful link: Creating a Heroku remote . 有用的链接: 创建一个Heroku遥控器

Taken from Quora (worked for me August 2018): 取自Quora (2018年8月为我工作):

Vinayak Sinha says: "Your heroku app has a git repository, you can find that in app settings. Vinayak Sinha说:“您的heroku应用程序具有git存储库,您可以在应用程序设置中找到它。

In your local git, add remote of that git repository, then you can fetch and push: 在本地git中,添加该git存储库的远程目录,然后即可获取并推送:

git remote add heroku (<=this is the remote name) remote_url"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM