Challenge - 5 Problems
Git Repository Configuration Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Jenkins Git Plugin: Repository URL Validation
You configure a Jenkins job with the Git repository URL:
https://github.com/example/repo.git. What will be the output of Jenkins when it tries to clone this repository if the URL is incorrect or unreachable?Attempts:
2 left
💡 Hint
Think about what Jenkins reports when it cannot access the Git repository.
✗ Incorrect
If the Git repository URL is incorrect or unreachable, Jenkins will show an error indicating failure to connect to the repository.
❓ Configuration
intermediate2:00remaining
Jenkins Git Plugin: Specifying Branch to Build
In Jenkins Git plugin configuration, which syntax correctly specifies to build only the
develop branch?Attempts:
2 left
💡 Hint
Branches are referenced under
refs/heads/ in Git.✗ Incorrect
The correct syntax to specify a branch in Jenkins Git plugin is
refs/heads/branch-name. So for the develop branch, it is refs/heads/develop.🔀 Workflow
advanced2:30remaining
Jenkins Pipeline: Git Checkout with Credentials
You want to checkout a private Git repository in a Jenkins pipeline using stored credentials with ID
git-creds. Which pipeline snippet correctly performs this checkout?Attempts:
2 left
💡 Hint
Using
checkout with GitSCM class allows specifying credentials explicitly.✗ Incorrect
The
checkout step with GitSCM class and userRemoteConfigs specifying credentialsId is the correct way to checkout a private repo with credentials in Jenkins pipeline.❓ Troubleshoot
advanced2:00remaining
Jenkins Git Plugin: Resolving 'No credentials specified' Error
A Jenkins job fails with the error:
ERROR: No credentials specified when trying to clone a private Git repository. What is the most likely cause?Attempts:
2 left
💡 Hint
Think about what Jenkins needs to access private repositories.
✗ Incorrect
If Jenkins tries to clone a private repository without credentials configured, it will fail with 'No credentials specified' error.
✅ Best Practice
expert3:00remaining
Best Practice for Jenkins Git Polling Configuration
Which Jenkins Git plugin polling configuration is best to minimize unnecessary builds while ensuring changes are detected promptly?
Attempts:
2 left
💡 Hint
Balance frequency and resource usage for polling.
✗ Incorrect
Polling every 5 minutes with a hashed schedule (H/5) reduces load and avoids all jobs polling simultaneously. Using shallow clone speeds up the clone process.