I am really sorry for necro posting. But for the future visitors. If you are pulling the Main repo (that repo contains a submodule) using ssh, if your .gitmodule file's url set to [https:]//xxxxxx/foo.git jenkins won't be able authenticate and build will be failed. So you should update your url under the .gitmodule file with ssh url.
If you are face any authentication problems please go to [http://]yourjenkins.com -> manage jenkins -> security and find "Git Host Key Verification Configuration" and be sure that it is set to Accept First connection
and if you still facing the issue please go to /var/jenkins_home/workspace/YOUR_JOB_NAME and check for pulled repo