url = ssh://email@example.com/myproject/myproject.git [remote "origin"] url = ssh://firstname.lastname@example.org/myproject/myproject.git
That's it... that's the whole file.
Thus, when the Jenkins job would fire, the Git steps would crash like so:
FATAL: Repository config file /path/to/jenkins/jobs/MyJob/workspace/.git/config invalid Cannot read file /path/to/jenkins/jobs/MyJob/workspace/.git/config java.lang.IllegalArgumentException: Repository config file /path/to/jenkins/jobs/MyJob/workspace/.git/config invalid Cannot read file /path/to/jenkins/jobs/MyJob/workspace/.git/config at org.eclipse.jgit.lib.BaseRepositoryBuilder.loadConfig(BaseRepositoryBuilder.java:684) (... more stacktrace ...)
Searches based on the stacktrace didn't find anything helpful. I had no expectation that the .git/config file itself was in question... I troubleshot as if it was a Jenkins issue that I figured meant bumping up some JVM startup parameter. When that rabbit hole produced no carrots, it finally hit me to check that config file itself.
Just blowing away the workspace from the Jenkins job page and rerunning the job was enough to clear the problem -- empty workspace means it'll make a new clone, and suddenly all is good.
Lesson: when the error points at that file, at least make sure the file itself is plugged in and getting power :-)