EGit import in Eclipse showing a runtime error

天大地大妈咪最大 提交于 2019-12-30 09:32:27

问题


I tried to make a really simple "hello world!" import using EGit in Eclipse. I have not found any evidence that the software is not working (no bug found in Google), so it looks I made something wrong which I do not know.

I followed the steps defined here: http://craigmart.in/2012/01/17/import-an-existing-git-repo-to-eclipse/

It crashes when connecting to GitHub.

Essentially this is what I am getting:

I have extracted the following information from the error log:

org.eclipse.core.runtime.CoreException: Connecting Git team provider failed. See log for details.
    at org.eclipse.egit.core.op.ConnectProviderOperation.execute(ConnectProviderOperation.java:112)
    at org.eclipse.egit.ui.internal.clone.GitImportWizard$8.run(GitImportWizard.java:289)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2262)
    at org.eclipse.egit.ui.internal.clone.GitImportWizard.importProjects(GitImportWizard.java:296)
    at org.eclipse.egit.ui.internal.clone.GitImportWizard.access$2(GitImportWizard.java:236)
    at org.eclipse.egit.ui.internal.clone.GitImportWizard$4.run(GitImportWizard.java:206)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Contains: Error connecting project TEst2, no Git repositories found

eclipse.buildId=4.7.0.I20170612-0950
java.version=1.8.0_144
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=es_ES
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product

Info:

Using pycharm and GitHub directory I have been able to use Git and connect to GitHub... it looks a problem with something I did on Eclipse, not a problem with my computer.

Does anybody know what I might have done wrong?


回答1:


In the Import Projects from Git dialog the Use New project wizard option seems to be broken (see Eclipse bug 324145).

Workaround:

Probably, the problem occurred after the repository has been cloned (otherwise you have to clone the repository first). To import an existing local Git repository use File > Open Projects from File System... (instead of File > Import... > Git > Projects from Git). If the project is not an Eclipse project but contains .java files, the project will be configured automatically as a Java project. The local Git repository will also be detected and added automatically.




回答2:


Thanks to @howlger answer
I visualized the solution



来源:https://stackoverflow.com/questions/45526179/egit-import-in-eclipse-showing-a-runtime-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!