"Invalid project description", importing from GIT repo problem

After copying my GIT repo from a PC computer onto my MAC, i can't seem to import it to an eclipse. Import happens via eGit plugin directly from existing local git repository.

Same exact import works perfectly fine on existing Windows computer.

Please advise.

org.eclipse.core.internal.resources.ResourceException: Invalid project description.
        at org.eclipse.core.internal.resources.Project.checkDescription(Project.java:162)
        at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:52)
        at org.eclipse.core.internal.resources.Project.create(Project.java:274)
        at org.eclipse.core.internal.resources.Project.create(Project.java:256)
        at org.eclipse.egit.ui.internal.clone.ProjectUtils.createExistingProject(ProjectUtils.java:115)
        at org.eclipse.egit.ui.internal.clone.ProjectUtils.access$0(ProjectUtils.java:92)
        at org.eclipse.egit.ui.internal.clone.ProjectUtils$1.run(ProjectUtils.java:66)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
        at org.eclipse.egit.ui.internal.clone.ProjectUtils.createProjects(ProjectUtils.java:84)
        at org.eclipse.egit.ui.internal.clone.GitImportWizard.importProjects(GitImportWizard.java:160)
        at org.eclipse.egit.ui.internal.clone.GitImportWizard.access$0(GitImportWizard.java:142)
        at org.eclipse.egit.ui.internal.clone.GitImportWizard$1.run(GitImportWizard.java:83)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    Contains: OK
    Contains: /Users/me/Repositories/ABC overlaps the location of another project: 'ABC'

Answers


"Contains: /Users/me/Repositories/ABC overlaps the location of another project: 'ABC'"

Looks like you already have a project in your workspace with the same name like the project you would like to import.


Ok, i'll try to sum it up, after I faced similiary problems and wasted some time:

Eclipse Juno /4.2 SR1 (however I think it is a general misunderstanding of how ecplise imports projects)

  1. If you want your new project "connected" to git/mercurial, you'll have to clone and import via "Import/Git/Import from Git"
  2. The import will fail if your "workspace dir" equals the "local destination dir". A git clone via egit MUST NOT be placed! in the "eclipse workspace dir"!

The project import will fail because the projectname in the cloned ".project file" allready exists in the eclipse workspace dir when the import occurs.

Hope this saves some time.


Following is worked for me. Copy/put your project outside of workspace [e.g : E:\yourproject ], then Go to 1. File-->Import-->General-->Existing Projects into Workspace 2. Browse your project 3. Select Checkbox "Copy projects into workspace" and press Finish. It will make copy of project into workspace.


Try to use different directories for workspace and git project. Workspace -> wsp, Git-Project -> wsp/git-project instead of: Workspace/Git-Project -> git-project


I've meet the same issue and after some time found following solution to remain git repo:

  1. remove project from workspace (it's there even if eclipse says about failure)
  2. import project as "Import -> General -> Existing Projects into Workspace"
  3. repair repo as "Team -> Share project -> Git -> "

Just one more note, your project shall contain .git folder

It's working fine for me


You have ABC already in your workspace. Remove it and then add this one.


This happens when cloning a remote git repository using import project -> project from git in the last step.


Hm I had similar problem with git repos (cloned from command line using git tool): Eclipse was damaging .git index inside project dir when I was importing projects cloned inside eclipse workspace. Than I cloned git repo outside workspace and imported in eclipse using "copy into workspace" checkbox and everything worked smoothly...

But it is worth to mention that I downloaded Eclipse Classic which comes without egit or without any git related plugins, because I had suspect that this egit plugin was resetting .git directory besides other import problems.

Maybe importing outside working dir is something what eclipse programmers want from us.


You should not copy git repos, you should clone them. However, looking at your error message, it doesn't especially seem like a git problem at all.


I just had this error; in order to solve it I removed the project from my workspace directory. I threw it on my desktop. Then when importing the project, check the box that says copy into workspace.

Eclipse checks in your workspace to see if the directory exists already, if it does, it gives the error.


Please do check this out. I had a multi level project. I was not able to import one of my subprojects because it gave me "invalid project description, resource contains /". This was because my subprojects had apply plugin: 'eclipse' I think so. This is a known issue and there is a bug created for it: https://issuetracker.springsource.com/browse/STS-2614


mvn eclipse:clean eclipse:eclipse 

I run above command from terminal and build issues in eclipse were resolved.


I had the same problem but I deleted the eclipse '.project' files and the import worked.


Need Your Help

Trim a string based on the string length

java string

I want to trim a string if the length exceeds 10 characters.

c# open a new form then close the current form?

c# winforms forms

For example, Assume that I'm in form 1 then I want: