“Git fatal: ref HEAD is not a symbolic ref” while using maven release plugin
I ran into the same error on Jenkins in combination with maven release plugin, we fixed it by going to Additional behaviours, Check out to specific local branch and enter ‘master’ I realise this is not a solution but it might give you some direction in where to look.