eclipse:无法导入git项目。

时间:2023-01-17 18:25:26

I got a problem with my eclipse, on debian. When I try to import a git project from github, using egit I got a Couldn't create temporary repository.

我在debian上遇到了eclipse的问题。当我试图从github导入一个git项目时,使用egit我得到了一个不能创建临时存储库的方法。

error after having set my project properties.

设置项目属性后出现错误。

However, I works ok when using running eclipse with sudo.

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

I think it would be related to wrong permissions somewhere, but cannot figure out where :s

我认为它可能与某个地方的错误权限有关,但不能确定何处:s。

I would appreciate some help.

我很感激你的帮助。

Thanks by advance !

提前谢谢!

1 个解决方案

#1


3  

Considering the source of org.eclipse.egit.ui.internal.clone.SourceBranchPage.java mentions /tmp, it should be related with some permission issue around /tmp.

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;
}

The OP jlengrand actually reports in the comments:

OP jlengrand在评论中写道:

The problem was simple in fact, but quite handy to track down:
My .gitconfig file had been corrupted during my debian upgrade, which caused egit to crash.

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

#1


3  

Considering the source of org.eclipse.egit.ui.internal.clone.SourceBranchPage.java mentions /tmp, it should be related with some permission issue around /tmp.

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;
}

The OP jlengrand actually reports in the comments:

OP jlengrand在评论中写道:

The problem was simple in fact, but quite handy to track down:
My .gitconfig file had been corrupted during my debian upgrade, which caused egit to crash.

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