【问题标题】:eclipse : impossible to import git projecteclipse:无法导入git项目
【发布时间】:2011-11-19 15:30:52
【问题描述】:

我的 Eclipse 在 debian 上出现问题。 当我尝试从 github 导入一个 git 项目时,使用 egit 我得到了一个 无法创建临时存储库。

设置我的项目属性后出错。

但是,当使用 sudo 运行 eclipse 时,我可以正常工作。

我认为这与某处的错误权限有关,但无法弄清楚:s

我将不胜感激。

提前致谢!

【问题讨论】:

    标签: linux eclipse git debian egit


    【解决方案1】:

    考虑到source of org.eclipse.egit.ui.internal.clone.SourceBranchPage.java提到/tmp,应该与/tmp周围的一些权限问题有关。

    try {
      final URIish uri = newRepoSelection.getURI();
      final Repository db = new Repository(new File("/tmp"));
      listRemoteOp = new ListRemoteOperation(db, uri);
      getContainer().run(true, true, listRemoteOp);
    } catch (IOException e) {
      transportError(UIText.SourceBranchPage_cannotCreateTemp);
      return;
    }
    

    OP jlengrand 实际上在 cmets 中报告:

    问题其实很简单,但是很容易找到:
    我的 .gitconfig 文件在我的 debian 升级过程中损坏,导致 egit 崩溃。

    【讨论】:

    • Humpph,但是有点奇怪,因为 ls -l 给我:drwxrwxrwt 9 root root 4096 Nov 20 18:17 tmp/。我应该拥有所需的所有权利。
    • 最后,您的提及让我走上了正确的道路。这个问题实际上很简单,但很容易追踪:s。我的 .gitconfig 文件在我的 debian 升级过程中损坏,导致 egit 崩溃。感谢冯 C 的提示;)
    • @jlengrand:很高兴您找到了这个问题的原因。我已将其包含在答案中,以提高知名度。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-19
    • 2020-07-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多