Jenkins build 'cannot find current revision' at GitHub

I have a (private) project at GitHub which has a submodule. When I invoke the ant build at the command line in Terminal (OSX), the build is fine. But when the same build.xml is invoked via Jenkins the main project is OK, but for the submodule I get:

/usr/local/git/bin/git submodule update –init –recursive returned
status code 1: stdout: stderr: fatal: Needed a single revision Unable
to find current revision in submodule path ‘mysubmodule’

The same git command on the command line in Terminal returns

Submodule path ‘mysubmodule’: checked out
‘e9a04b127f40ba4c11f45718761a0e7965638394’

I am a relative beginner with both Jenkins and GitHub and I’m frankly not sure where to go with this. I have searched the web, but found very little and not apparently relevant content about this error.

Git Baby is a git and github fan, let's start git clone.