Recall & Review
beginner
What is the purpose of the Git plugin in Jenkins?
The Git plugin allows Jenkins to connect to Git repositories to clone, fetch, and manage source code for builds.
Click to reveal answer
beginner
Which Jenkins field specifies the Git repository URL in the Git plugin configuration?
The 'Repository URL' field is where you enter the Git repository's HTTPS or SSH URL.
Click to reveal answer
intermediate
How do you provide credentials for private Git repositories in Jenkins Git plugin?
You add credentials in Jenkins and select them in the Git plugin under 'Credentials' to allow Jenkins to access private repos.
Click to reveal answer
beginner
What does the 'Branches to build' field control in the Git plugin?
It specifies which branch or branches Jenkins should check out and build, e.g., 'main' or 'feature/*'.
Click to reveal answer
intermediate
How can you configure Jenkins Git plugin to clean the workspace before building?
Enable the 'Clean before checkout' option to remove old files and ensure a fresh copy of the repository.
Click to reveal answer
In Jenkins Git plugin, where do you enter the URL of the Git repository?
✗ Incorrect
The Repository URL field is used to specify the Git repository location.
How does Jenkins authenticate to a private Git repository using the Git plugin?
✗ Incorrect
Jenkins uses stored credentials selected in the Git plugin to authenticate securely.
What is the effect of setting 'Branches to build' to 'main' in the Git plugin?
✗ Incorrect
Specifying 'main' means Jenkins will check out and build only the main branch.
Which option ensures Jenkins cleans the workspace before checking out the Git repository?
✗ Incorrect
The 'Clean before checkout' option removes old files to avoid conflicts.
What type of URL can be used in the Git plugin's Repository URL field?
✗ Incorrect
The Git plugin supports both HTTPS and SSH URLs for repositories.
Describe how to configure Jenkins Git plugin to build a private repository branch.
Think about URL, credentials, and branch settings.
You got /3 concepts.
Explain the purpose of the 'Clean before checkout' option in Jenkins Git plugin.
Consider workspace cleanliness before build.
You got /3 concepts.