首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >“捆绑安装”错误:无法打开. .git/FETCH_HEAD:权限被拒绝

“捆绑安装”错误:无法打开. .git/FETCH_HEAD:权限被拒绝
EN

Stack Overflow用户
提问于 2014-12-11 06:42:09
回答 4查看 8.1K关注 0票数 7

我最近把我的ubuntu换成了Linux mint,所以我需要重新安装我的宝石,但是它给了我这个错误.

步骤我已经完成了

  • 生成pub/私钥并添加到github中。
  • 重新运行命令"bundle install“,但它不起作用。

代码语言:javascript
运行
复制
Fetching git://github.com/seuros/capistrano-puma.git
error: cannot open .git/FETCH_HEAD: Permission denied

Retrying git fetch --force --quiet --tags 


"/home/asad/.bundler/cache/git/capistrano-puma-e90ae8bdcca081264c0ff67caa1d11e89f7a01e0" due to error (2/3): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags "/home/asad/.bundler/cache/git/capistrano-puma-e90ae8bdcca081264c0ff67caa1d11e89f7a01e0"` in directory /usr/local/rvm/gems/ruby-2.0.0-p598/bundler/gems/capistrano-puma-7748efb9a53d has failed.
        If this error persists you could try removing the cache directory '/home/asad/.bundler/cache/git/capistrano-puma-e90ae8bdcca081264c0ff67caa1d11e89f7a01e0'
        error: cannot open .git/FETCH_HEAD: Permission denied

        Retrying git fetch --force --quiet --tags "/home/asad/.bundler/cache/git/capistrano-puma-e90ae8bdcca081264c0ff67caa1d11e89f7a01e0" due to error (3/3): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags "/home/asad/.bundler/cache/git/capistrano-puma-e90ae8bdcca081264c0ff67caa1d11e89f7a01e0"` in directory /usr/local/rvm/gems/ruby-2.0.0-p598/bundler/gems/capistrano-puma-7748efb9a53d has failed.
        If this error persists you could try removing the cache directory '/home/asad/.bundler/cache/git/capistrano-puma-e90ae8bdcca081264c0ff67caa1d11e89f7a01e0'
        error: cannot open .git/FETCH_HEAD: Permission denied

        Git error: command `git fetch --force --quiet --tags "/home/asad/.bundler/cache/git/capistrano-puma-e90ae8bdcca081264c0ff67caa1d11e89f7a01e0"` in directory
        /usr/local/rvm/gems/ruby-2.0.0-p598/bundler/gems/capistrano-puma-7748efb9a53d has failed.
        If this error persists you could try removing the cache directory '/home/asad/.bundler/cache/git/capistrano-puma-e90ae8bdcca081264c0ff67caa1d11e89f7a01e0'
EN

回答 4

Stack Overflow用户

发布于 2015-12-15 00:32:49

如果您使用的是rvm,请从命令行运行:

代码语言:javascript
运行
复制
~> rvm fix-permissions

这为我解决了那种错误。

票数 16
EN

Stack Overflow用户

发布于 2015-05-01 15:35:19

代码语言:javascript
运行
复制
bundle exec bundle install

为我工作过。当我作为root登录时,我犯了安装ruby的错误,所以我现在必须这样做,直到我解决了问题。

票数 1
EN

Stack Overflow用户

发布于 2015-04-16 10:13:41

我在升级班德勒的时候也遇到了同样的问题.原来,包系统安装位置中的缓存目录导致了这个问题。彻底清除这个问题--这是在OSX上,不是使用RVM,而是10.10.3上的标准OSX ruby。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27416849

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档