简体   繁体   中英

EGit - import project (only src) from github as java project

I tried recently import project, which has only src ( *.java) files. I always receive errors like

Connecting Git team provider failed. See log for details.
Connecting Git team provider failed. See log for details.
Error connecting project Navigator, no Git repositories found

.gitignore looks like this:

/bin/
# Intellij
.idea/
*.iml
*.iws

# Eclipse
.classpath
.project
.settings/

# Package Files #
*.jar
*.war
*.ear

*.class

I can import project (as bare src files - can't execute it no java names support etc.) BUT when I try to convert it to java project I receive errors like that at the beginning of question

@edit1 As asked .log:

!SESSION 2015-12-19 22:37:01.406 -----------------------------------------------
eclipse.buildId=4.5.1.M20150904-0015
java.version=1.8.0_65
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pl_PL
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

!ENTRY org.eclipse.egit.ui 2 0 2015-12-19 22:37:11.004
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\Jakub'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.eclipse.egit.ui 4 0 2015-12-19 22:38:31.914
!MESSAGE Connecting Git team provider failed. See log for details.
!STACK 1
org.eclipse.core.runtime.CoreException: Connecting Git team provider failed. See log for details.
    at org.eclipse.egit.core.op.ConnectProviderOperation.execute(ConnectProviderOperation.java:111)
    at org.eclipse.egit.ui.internal.clone.GitImportWizard$8.run(GitImportWizard.java:286)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2225)
    at org.eclipse.egit.ui.internal.clone.GitImportWizard.importProjects(GitImportWizard.java:291)
    at org.eclipse.egit.ui.internal.clone.GitImportWizard.access$2(GitImportWizard.java:235)
    at org.eclipse.egit.ui.internal.clone.GitImportWizard$4.run(GitImportWizard.java:205)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Contains: Error connecting project Navigator, no Git repositories found
!SUBENTRY 1 org.eclipse.egit.core 4 0 2015-12-19 22:38:31.916
!MESSAGE Connecting Git team provider failed. See log for details.
!SUBENTRY 2 org.eclipse.egit.core 4 0 2015-12-19 22:38:31.916
!MESSAGE Error connecting project Navigator, no Git repositories found

I had aa similar problem with importing my own PHP projects in eclipse. I do not know how to fix it, however changing the project into a general eclipse project when importing instead of a java project worked for me. You can then change the general eclipse project into a java project if you want to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM