无法推送到Heroku'致命:无法访问.提供的节点名或服务名,或者未知" [英] Cannot push to Heroku 'fatal: unable to access..Could not resolve host: (nil); nodename nor servname provided, or not known'
问题描述
我在Heroku上有一些应用程序,没有任何问题,但是突然我在运行git时遇到了问题.现在,我无法将我的应用程序部署到Heroku.当我跑步
I have a few apps on Heroku, nothing has had this problem but I suddenly have had issues running git. Now I can't deploy my app to Heroku. When I run
git push heroku master
我得到以下信息:
fatal: unable to access 'https://git.heroku.com/<herokuappname>.git/': Could not resolve host: (nil); nodename nor servname provided, or not known
我跑步时
git remote -v
我得到以下信息:
heroku https://git.heroku.com/<herokuappname>.git (fetch)
heroku https://git.heroku.com/<herokuappname>.git (push)
我已经查了所有东西.请帮忙,谢谢.
I've looked up everything. Please help, thank you.
推荐答案
每当我偶然发生这种情况时,再次删除并添加heroku作为远程引用始终是可行的.
Whenever this randomly happens to me, removing and adding heroku again as a remote reference always works.
首先检查您是否将heroku用作遥控器.
First check if you do have heroku as a remote.
git remote -v
如果存在heroku,请将其删除.
If heroku is present, remove it.
git remote rm heroku
然后将其重新添加.
git remote add heroku git@heroku.com:project.git
通常,它可以与我一起使用,尝试一下,让我知道会发生什么情况.
Usually this works with me, try it and let me know what happens.
这篇关于无法推送到Heroku'致命:无法访问.提供的节点名或服务名,或者未知"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!