I am noticing that the command bellow fails
git -c core.askpass=true fetch --tags --progress https://github.com/myproject.git +refs/heads/*:refs/remotes/origin/*
While tracing through the error log, I see that it fails to fetch the repo and then returns a status code of 128. What makes this very confusing is that is prints this out as the reason
stderr: fatal: Reference directory conflict: refs/heads/
Considering the large number of installations and users of the git plugin and git client plugin, I suspect this is an issue in your local installation, not in the plugin. That message seems to indicate that command line git found an inconsistency in the .git/refs/heads directory of the workspace.
You may be able to resolve that complaint by using "Wipe workspace" to delete the entire workspace.
You may need to check your build process to investigate if it is damaging the contents of the .git directory.