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’
- Jenkins Continuous Integration and Google Glass Project
- On building jenkins project timeout after 10 minute error happens
- How are environment variables used in Jenkins with Windows Batch Command?
- How to retrieve current workspace using Jenkins Pipeline Groovy script?
- sbt-release not able to git push
- Finding IP of a Jenkins node
The same git command on the command line in Terminal returns
Submodule path ‘mysubmodule’: checked out
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.
2 Solutions collect form web for “Jenkins build 'cannot find current revision' at GitHub”
I have the same error message on my windows slave and I’ve figured out that I simply have no permissions to read protected repository. Adding private keys to
Git\.ssh directory fix the issue.
git submodule update --remote --recursive to update your submodules.