2015-02-21 9 views
12

Ho alcune app su Heroku, niente ha avuto questo problema ma improvvisamente ho avuto problemi durante l'esecuzione di git. Ora non posso distribuire la mia app su Heroku. Quando eseguoImpossibile inviare a Heroku l'esito fatale: impossibile accedere ... Impossibile risolvere l'host: (nil); nodename e nomeserver forniti o non noti '

git push heroku master 

ottengo il seguente:

fatal: unable to access 'https://git.heroku.com/<herokuappname>.git/': Could not resolve host: (nil); nodename nor servname provided, or not known 

Quando eseguo

git remote -v 

ottengo il seguente:

heroku https://git.heroku.com/<herokuappname>.git (fetch) 
heroku https://git.heroku.com/<herokuappname>.git (push) 

Ho guardato tutto . Per favore aiuto, grazie.

+0

Forse è stata selezionata [questa discussione] (http://stackoverflow.com/questions/18290822/ why-does-git-fetch-fail-with-could-not-resolve-host-nil-with-https-git)? Non è correlato a heroku, ma ha anche problemi con il fatto di non essere in grado di collegarsi a git repo, che sembra essere un problema di root. –

risposta

19

Ogni volta che succede casualmente a me, rimuovere e aggiungere heroku nuovamente come riferimento remoto funziona sempre.

Primo controllo se si dispone di heroku come telecomando.

git remote -v

Se heroku è presente, rimuoverlo.

git remote rm heroku

quindi aggiungerlo indietro.

git remote add heroku [email protected]:project.git

Di solito questo funziona con me, provatelo e fatemi sapere cosa succede.

+2

Non ha funzionato per me, heroku git: remote -a , tratto da http://stackoverflow.com/questions/5129598/how-to-link-a-folder-with-an-existing-heroku- l'app ha fatto il lavoro. –

+0

Lo stesso con me ho estratto un repository e ho dovuto aggiungere: heroku keys: aggiungi prima e poi fai heroku git: remote -a trickydiddy

11

Prova questo:

heroku keys:add 

funzionato per me

2
git remote -v 
git remote rm heroku 
git remote add heroku [email protected]:project(full url).git 
heroku keys:add 

Questi passaggi lavorato

Problemi correlati