Getting "Ref HEAD cannot be resolved" when starting JBoss EAP pointing to a remote git repository

Solution Verified - Updated -

Issue

I've been trying out the feature which allows the configuration files to be stored in git, but it's not working the way I expect, and there's something missing. I get the following error on startup:

/ 18:39:08,209 INFO  [org.jboss.modules] (main) JBoss Modules version 1.8.6.Final-redhat-00001
java.lang.RuntimeException: WFLYSRV0268: Failed to pull the repository https://<linktosomegit>/<user>/<repository>.git
        at org.jboss.as.server.controller.git.GitRepository.<init>(GitRepository.java:106)
        at org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:539)
        at org.jboss.as.server.Main.determineEnvironment(Main.java:388)
        at org.jboss.as.server.Main.main(Main.java:96)
        at org.jboss.modules.Module.run(Module.java:352)
        at org.jboss.modules.Module.run(Module.java:320)
        at org.jboss.modules.Main.main(Main.java:593)
Caused by: org.eclipse.jgit.api.errors.RefNotFoundException: Ref HEAD cannot be resolved
        at org.eclipse.jgit.api.CreateBranchCommand.getStartPointObjectId(CreateBranchCommand.java:279)
        at org.eclipse.jgit.api.CreateBranchCommand.call(CreateBranchCommand.java:132)
        at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:225)
        at org.jboss.as.server.controller.git.GitRepository.checkoutToSelectedBranch(GitRepository.java:156)
        at org.jboss.as.server.controller.git.GitRepository.<init>(GitRepository.java:91)
        ... 6 more
18:39:09,174 FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content