11650
JGitを利用してリポジトリのクローンを行を行うため、次のようなコードを記述しました。

```

    Git result = Git
            .cloneRepository()
            .setBare(true)
            .setURI(remoteUrl)
            .setCredentialsProvider(
                    new UsernamePasswordCredentialsProvider(user,
                            password)).setDirectory(localDir)
            .setBranch(branch).call();
    
```

上記のコードを実行すると、エラーとなります。

```

    java.lang.InternalError: Should not get here
                at sun.nio.fs.WindowsNativeDispatcher.CreateSymbolicLink0(Native Method)
                at sun.nio.fs.WindowsNativeDispatcher.CreateSymbolicLink(WindowsNativeDispatcher.java:890)
                at sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink(WindowsFileSystemProvider.java:578)
                at java.nio.file.Files.createSymbolicLink(Files.java:1043)
                at org.eclipse.jgit.util.FileUtil.createSymLink(FileUtil.java:111)
                at org.eclipse.jgit.util.FS_Win32.detectSymlinkSupport(FS_Win32.java:171)
                at org.eclipse.jgit.util.FS_Win32.supportsSymlinks(FS_Win32.java:162)
                at org.eclipse.jgit.internal.storage.file.FileRepository.create(FileRepository.java:306)
                at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:115)
                at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:161)
                at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:132)
                at jp.hotpepper.ant.task.git.GitCloneTask.execute(GitCloneTask.java:59)
                at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:497)
                at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
                at org.apache.tools.ant.Task.perform(Task.java:348)
                at org.apache.tools.ant.Target.execute(Target.java:435)
                at org.apache.tools.ant.Target.performTasks(Target.java:456)
                at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
                at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
                at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
                at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
                at org.apache.tools.ant.Main.runBuild(Main.java:853)
                at org.apache.tools.ant.Main.startAnt(Main.java:235)
                at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
                at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
    
```

何か設定が足りないのでしょうか？  
ご教示のほどお願いいたします。

実行環境です。  
Windows 7 Professional SP1 64bit  
java version "1.6.0_17"  
pom.xml :

```

    <dependency>
        <groupId>org.eclipse.jgit</groupId>
        <artifactId>org.eclipse.jgit</artifactId>
        <version>4.0.0.201506090130-r</version>
    </dependency>
    
```
CC BY-SA 3.0
2015-06-23T11:42:12.700
11644
2015-06-23T14:58:28.590
6070
question
java
JGitでリポジトリクローンを行うと失敗する
JGit 4.0ではJava7が必要です。

<https://github.com/eclipse/jgit/tree/stable-4.0>
CC BY-SA 3.0
2015-06-23T14:58:28.590
11650
2015-06-23T14:58:28.590
241
11644
answer