Search code examples
herokuheroku-toolbelt

Heroku: how to clone or create team app?


I've created a Team in Heroku and now I'd like to create an app inside that team from the cli, but there seem to be no team related cli flags. I'm basically hoping for something like:

heroku create myteamapp --org myteam

I could also create the app in the online dashboard, but when I do that and I clone the app I can't push for some reason. What I did (I suplemented names for fake names):

$ git:clone -a myteamapp 
Cloning into 'myteamapp'...
warning: You appear to have cloned an empty repository.
Checking connectivity... done.
$ git remote -v
heroku  https://git.heroku.com/myteamapp.git (fetch)
heroku  https://git.heroku.com/myteamapp.git (push)
$ git push heroku master
error: src refspec master does not match any.
error: failed to push some refs to 'https://git.heroku.com/myteamapp.git'

The app is listed when I run heroku apps --org myteam.
The info that heroku info returns seems valid, the Git URL matches the remote url, the region is eu, which I configures in the online dashboard. My user is listed as admin in the access section of the online dashboard for that app.

There was no team relevant docs in:

  • devcenter.heroku.com/articles/creating-apps
  • devcenter.heroku.com/articles/git-clone-heroku-app

There was no cli relevant docs in:

  • devcenter.heroku.com/articles/heroku-teams

Solution

  • I should have checked heroku help create. This lists -o or --org as flags to specify the organization. The errors I got after trying that,that confused me where related to git; I didn't have any commits yet.