作者:四木子1982 | 来源:互联网 | 2023-05-21 07:54
我在Heroku上有一些应用程序,没有任何问题,但我突然遇到运行git的问题.现在我无法将我的应用程序部署到Heroku.我跑的时候
git push heroku master
我得到以下内容:
fatal: unable to access 'https://git.heroku.com/.git/': Could not resolve host: (nil); nodename nor servname provided, or not known
我跑的时候
git remote -v
我得到以下内容:
heroku https://git.heroku.com/.git (fetch)
heroku https://git.heroku.com/.git (push)
我查了一切.请帮忙,谢谢.
1> Rachelle Uy..:
每当这个随机发生在我身上时,删除并再次添加heroku作为远程引用始终有效.
首先检查你是否有heroku作为遥控器.
git remote -v
如果存在heroku,请将其删除.
git remote rm heroku
然后加回来.
git remote add heroku git@heroku.com:project.git
通常这适用于我,尝试它,让我知道会发生什么.
对我来说没用,heroku git:remote -a
,取自http://stackoverflow.com/questions/5129598/how-to-link-a-folder-with-an-existing-heroku-app做了这个工作.
2> Sergey..:
试试这个:
heroku keys:add
为我工作
3> 小智..:
git remote -v
git remote rm heroku
git remote add heroku git@heroku.com:project(full url).git
heroku keys:add
这些步骤有效