“heroku create”命令的权限被拒绝

时间:2012-05-20 01:47:03

标签: ruby-on-rails-3 heroku

以前,当我将我的第一个应用程序推送到heroku时,它没有遇到任何问题 - 我输入了“heroku create”,这一切都很好。但是现在我收到以下错误消息:

/Users/stuartnelson3/.heroku/client/vendor/gems/netrc-0.7.1/lib/netrc.rb:20:in `readlines': Permission denied - /Users/stuartnelson3/.netrc (Errno::EACCES)
from /Users/stuartnelson3/.heroku/client/vendor/gems/netrc-0.7.1/lib/netrc.rb:20:in `read'
from /Users/stuartnelson3/.heroku/client/lib/heroku/auth.rb:92:in `netrc'
from /Users/stuartnelson3/.heroku/client/lib/heroku/auth.rb:116:in `read_credentials'
from /Users/stuartnelson3/.heroku/client/lib/heroku/auth.rb:59:in `get_credentials'
from /Users/stuartnelson3/.heroku/client/lib/heroku/auth.rb:47:in `user'
from /Users/stuartnelson3/.heroku/client/lib/heroku/auth.rb:14:in `client'
from /Users/stuartnelson3/.heroku/client/lib/heroku/command/base.rb:38:in `heroku'
from /Users/stuartnelson3/.heroku/client/lib/heroku/command/apps.rb:108:in `create'
from /Users/stuartnelson3/.heroku/client/lib/heroku/command.rb:148:in `send'
from /Users/stuartnelson3/.heroku/client/lib/heroku/command.rb:148:in `run'
from /Users/stuartnelson3/.heroku/client/lib/heroku/cli.rb:9:in `start'
from /usr/bin/heroku:28

如果我做“sudo heroku create”它可以工作,但是一次又一次地做这件事很痛苦,而且我原本没有。任何人都可以帮我解决发生的事情吗?我一直在环顾四周,但似乎无法找到我的netrc问题。我对git没有任何问题。

1 个答案:

答案 0 :(得分:2)

错误基本上意味着在访问文件本身或其所在的目录之一时拒绝了权限。很可能是文件本身,所以以下内容应该有所帮助:

sudo chown stuartnelson3 /Users/stuartnelson3/.netrc
chmod 600 /Users/stuartnelson3/.netrc