Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git Heroku推送应用程序问题_Git_Heroku - Fatal编程技术网

Git Heroku推送应用程序问题

Git Heroku推送应用程序问题,git,heroku,Git,Heroku,我安装了Heroku并设置了一个帐户,但由于某种原因,每当我尝试将应用程序推送到该站点时,都会出现此错误 $ git push heroku master ! No such app as first_app fatal: The remote end hung up unexpectedly 我查过heroku是否看到了git $ git remote -v heroku git@heroku.com:first_app.git (fetch) heroku git@heroku.co

我安装了Heroku并设置了一个帐户,但由于某种原因,每当我尝试将应用程序推送到该站点时,都会出现此错误

$ git push heroku master
!  No such app as first_app
fatal: The remote end hung up unexpectedly
我查过heroku是否看到了git

$ git remote -v
heroku  git@heroku.com:first_app.git (fetch)
heroku  git@heroku.com:first_app.git (push)

如何让heroku识别我的git文件?

您似乎已经重命名了应用程序

如果已重命名应用程序,请按照以下说明操作:


如下:如果您通过Heroku Web界面更新了应用程序,则更新Git remotes部分

您是否在Heroku上创建了应用程序-通过Heroku create?Heroku create将Heroku git remote设置为Heroku上的目标回购


您可以通过转到,然后在列表中查找已创建的应用进行检查。如果您可能已经重命名了应用程序(或者要查看repo URL),请单击应用程序名称,它将显示git repo地址。确保这与您在本地计算机上执行git remote-v时看到的内容相匹配。

尝试这一行重新启动en refresh Heroku

heroku restart

这是一个常见的重命名问题

你应该返回heroku并将你的应用程序重命名为旧名称

并运行以下命令,从console为其指定一个新名称:

heroku apps:rename new_app_name

如果您使用CLI从Git签出目录中重命名应用程序,您的远程设备将自动更新。如果您从网站重命名或有其他签出,例如属于其他开发人员的签出,则需要手动更新这些签出:

$ git remote rm heroku
$ heroku git:remote -a newname

这里有一个步骤,第一次在git中重命名你的应用程序,以匹配它的新heroku名称。它还包括与此处提到的其他端子输入稍有不同的端子输入

  • 打开终端并使用

    • cd..
      返回主目录并

      cd*dev_folder*/*app_folder*
      导航到正确的文件夹

    • dev_folder和app_folder将是您归档应用程序的文件夹的实际名称

    • 现在将显示终端中的shell提示符

      用户_name@computer_name:~/dev\u文件夹/app\u文件夹$

  • 通过在$prompt后键入以下内容删除当前heroku关联:

    git远程rm heroku

  • 打开浏览器并登录heroku

  • 在heroku上,单击顶部导航栏中的“MyApps”

  • 在heroku上,单击要与本地目录关联的应用程序

  • 在heroku上,单击看起来像齿轮的“设置”图标

  • 在heroku上向下滚动设置页面,直到找到“信息”部分

  • 在heroku上复制您的Git URL,git@heroku.com:yourappname.git,来自信息部分

  • 回到你的终点站

  • 在$提示符后键入terminal,添加新的heroku应用程序名称:

    git远程添加heroku(粘贴您的git url)

    您的完整提示如下所示:

    用户_name@computer_name:~/dev\u folder/app\u folder$git remote add herokugit@heroku.com:*yourappname*.git

  • 全部完成,试着推

  • 尝试重新添加远程url

    // Check for the current url 
    git remote -v
    
    // remove remote url
    git remote rm heroku
    
    // re-add the remote url
    git remote add heroku git@heroku.com:boiling-inlet-6951.git
    

    我会放弃的,但你仍然没有选择正确的答案。你能选择正确的答案吗?是的,就是那个!