2011-03-14 69 views
28

這應該很簡單,我發誓它工作一個小時前。我可以登錄到Heroku的,但不能運行任何有用的命令:入門(不)與Heroku:應用程序未找到

$ heroku login 
Enter your Heroku credentials. 
Email: [email protected] 
Password: 
$ heroku stack 
App not found 
$ heroku config 
App not found 

也許,這就是問題的根源?

$ git remote show heroku 
! No such app as empty-samurai-345 
fatal: The remote end hung up unexpectedly 

empty-samuri-345是我之前刪除的應用程序。我真正想要做的就是使用bamboo-mri-1.9.2堆棧上傳一個新應用。

預先感謝建議...

+0

我有類似的症狀,事實證明問題是我登錄到不同的Heroku帳戶。 – gohnjanotis 2011-05-30 03:15:13

回答

76

您需要在使用該命令刪除Heroku的偏遠git

git remote rm heroku 

然後你就可以將新的遠程使用這一個加

git remote add heroku [email protected]:your-app.git 

然後嘗試運行您的heroku命令。

+1

漂亮 - 謝謝。我最終編輯.git文件以刪除heroku條目 - 這似乎也起作用。 – 2011-03-15 22:41:25

+0

這是記錄在這裏:https://devcenter.heroku.com/articles/renaming-apps#updating-git-remotes – adam 2012-12-08 18:26:40

+1

我有同樣的問題,因爲我改名我的應用程序。我打開'.git/config'並更改Heroku的repo URL並解決了問題。 – 2013-01-16 03:51:47

10

運行以下

git config -l 

的配置重點是容易被發現,remote.heroku.url

現在,如果你舒服編輯的配置直接,只是:

git config -e 

如果不是:

# Confirm you've got the right key 
git config remote.heroku.url 
# Substitute your_app_name appropriately 
git config remote.heroku.url [email protected]:your_app_name.git 

我的答案是基於關閉fearless_fool的評論,缺乏很多細節。

供參考:配置文件位於/your_git_repo/.git/config

+0

編輯文件後,轉義離開插入模式和:wq保存並退出。 – 2014-08-05 20:05:31

2

我只是從網上的Heroku儀表盤重命名我的應用程序遇到了同樣的問題。 然後我試着在我的本地機器上運行一些cli命令,它給了'App not found'。我想Cli不知道我重命名我的應用程序的變化。

因此,我再次登錄到heroku網站,並用舊名稱重命名該應用程序。 然後所有命令從cli開始工作。

所以不要使用在線儀表板重命名您的應用程序,請使用CLI。

我希望它可以幫助別人.. !!

+0

而不是使用儀表板來撤消名稱更改,而應該編輯您的回購''。git/config(快捷方式做的是'git config -e'),並用新名稱替換舊名稱(即將'url = [email protected]:old-name-1234.git'更改爲'url = [email protected]:new-name-5678.git')。請參閱@ derek-litz的答案http://stackoverflow.com/a/11739726/664833 – user664833 2014-08-31 05:01:47