2014-02-21 48 views
0

我试过安装并重新安装Heroku toolbelt约10次,但我似乎无法弄清楚如何正确安装它。我试过多次删除和添加ssh密钥以及许多其他的stackoverflow解决方案,但不知道从哪里去。任何帮助将不胜感激,因为我由于对命令行的基本理解而陷入困境。Heroku toolbelt未被识别OSX

$ heroku # or heroku login, heroku help, etc. 
fatal: 'heroku' does not appear to be a git repository 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

$ which heroku 
/usr/bin/heroku 

这是文件

#!/usr/local/heroku/ruby/bin/ruby 
# encoding: UTF-8 

# resolve bin path, ignoring symlinks 
require "pathname" 
bin_file = Pathname.new(__FILE__).realpath 

# add locally vendored gems to libpath 
gem_dir = File.expand_path("../../vendor/gems", bin_file) 
Dir["#{gem_dir}/**/lib"].each do |libdir| 
    $:.unshift libdir 
end 

# add self to libpath 
$:.unshift File.expand_path("../../lib", bin_file) 

# inject any code in ~/.heroku/client over top 
require "heroku/updater" 
Heroku::Updater.inject_libpath 

# start up the CLI 
require "heroku/cli" 
Heroku.user_agent = "heroku-toolbelt/#{Heroku::VERSION} (#{RUBY_PLATFORM}) ruby/#{RUBY_VERSION}" 
Heroku::CLI.start(*ARGV) 

的.bashrc 出口路径的内容= “在/ usr /本地/ Heroku的/ bin中:$ PATH”

+0

如果你在mac osx上,为什么不直接使用他们的安装程序?https://toolbelt.heroku.com/会为你做的一切吗? –

+0

这正是我用它,并没有在我的新电脑(macbook air mavericks)出于某种原因我无法弄清楚。我的最后一个安装非常简单。 – avalente1

+1

你的第3行表明键入“heroku”似乎试图打开一些git repo,你有一些别名是阻碍吗? –

回答

0

“推的Heroku” 的别名正在阻止工具带被调用。删除这使得heroku命令正常工作,然后可以进行正确的设置。