Re: Cannot run program "git" ... error=12, Cannot allocate memory
"java.io.IOException: error=12, Cannot allocate memory" is a problem
with too little swap space IIRC. You could try to google that, there
should be some information regarding that. Basically when Jenkins
calls git, the Jenkins process is forked, which for a short amount of
time takes up twice the memory you set up for your Jenkins, if your
machine does not have sufficient memory (physical and swap) you will
get the error.
As to the problem with the corrupt repository I have no clue and no
experience with git.