Conta
Faça login com sua conta pessoal do heroku
cd ~/<name of my project>
e
heroku accounts:add <name of my project> --auto
Resultado
Enter your Heroku credentials.
Email: <your heroku email>
Password (typing will be hidden):
Add the following to your ~/.ssh/config
Host heroku.<name of my project>
HostName heroku.com
IdentityFile /PATH/TO/PRIVATE/KEY
IdentitiesOnly yes
Criar chaves
ssh-keygen
Adicionar prefixo nas chaves ‘<nome do meu projeto> _’
~/.ssh/<name of my project>_id_rsa
~/.ssh/<name of my project>_id_rsa.pub
Altera o arquivo ~ / .ssh / config
Host heroku.<name of my project>
HostName heroku.com
IdentityFile ~/.ssh/<name of my project>_id_rsa
IdentitiesOnly yes
Definir usuário
heroku accounts:set <name of my project>
Adicionar chaves
ssh-add ~/.ssh/<name of my project>_id_rsa
heroku keys:add ~/.ssh/<name of my project>_id_rsa.pub
Criar pilha
heroku create --remote production <name of my project>-prod --stack cedar
Seu novo controle remoto
git remote -v
production git@heroku.com:<name of my project>-prod.git (push)
production git@heroku.com:<name of my project>-prod.git (fetch)
Altera a configuração do git
vi .git/config
[remote "production"]
url = git@heroku.<name of my project>:<name of my project>-prod.git
fetch = +refs/heads/*:refs/remotes/production/*
Envie seu código au heroku
git push production master:master -f
Sim !