




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1: What is the main purpose of GitLab as a platform? A) Issue tracking only B) Version control and DevOps lifecycle support C) Code debugging D) Database management Correct Answer: B Explanation: GitLab is a comprehensive platform that offers version control, CI/CD, and other DevOps tools, making it more than just an issue tracker. Question 2: Which component in GitLab helps automate software builds and tests? A) GitLab Runner B) GitLab Wiki C) GitLab Pages D) GitLab Snippets Correct Answer: A Explanation: GitLab Runner is the component responsible for running jobs in the CI/CD pipeline, automating builds, tests, and deployments. Question 3: What is the primary function of a Git repository in GitLab? A) To store and manage database records B) To handle documentation only C) To track changes in code and files over time
D) To generate user reports automatically Correct Answer: C Explanation: A Git repository is designed to track code changes and maintain a history of all modifications, enabling collaborative version control. Question 4: Which feature allows teams to collaborate on code changes in GitLab? A) Merge Requests B) Activity Feed C) System Hooks D) GitLab Status Page Correct Answer: A Explanation: Merge Requests (MRs) enable collaborative code reviews and merging, letting multiple contributors discuss and approve changes. Question 5: Which of the following is NOT a key benefit of GitLab? A) Centralized version control B) Continuous Integration/Continuous Deployment C) Data encryption for email inboxes D) Built-in issue tracking Correct Answer: C Explanation: GitLab’s features include version control, CI/CD, and built-in issue tracking. It does not primarily serve as an email encryption platform.
D) Wiki Pages Correct Answer: A Explanation: GitLab’s Issue Boards provide a visual representation of issues across various workflow stages, helping teams track progress. Question 9: In GitLab, what is the purpose of SSH keys in account settings? A) To manage email notifications B) To securely authenticate when cloning or pushing code C) To enable read-only access to repositories D) To lock access to project milestones Correct Answer: B Explanation: SSH keys allow secure communication between your local system and GitLab servers without requiring passwords every time. Question 10: Which role in GitLab typically has the highest level of access to manage the entire platform? A) Guest B) Developer C) Maintainer D) Administrator Correct Answer: D Explanation: Administrators have the highest permissions in GitLab, enabling them to configure and manage settings across the instance.
Question 11: What is a typical first step after creating a new GitLab repository? A) Creating an issue board B) Cloning the repository locally C) Changing project visibility to private D) Setting up a deployment to production Correct Answer: B Explanation: Once a repository is created, most users clone it locally to start working on code and track changes via Git. Question 12: Which GitLab feature enables you to have multiple versions of your codebase simultaneously? A) Wiki B) Branching C) Issue Templates D) Snippets Correct Answer: B Explanation: Branches in GitLab allow you to maintain different versions of your code, facilitating parallel development. Question 13: How can you integrate GitLab with Slack for notifications? A) By creating a Slack snippet B) Through GitLab’s built-in Slack integration in project settings
Question 16: Which command is used locally to retrieve an updated copy of a GitLab repository? A) git clone B) git fetch C) git pull D) git status Correct Answer: C Explanation: The git pull command fetches changes from the remote repo and merges them into your local branch. Question 17: In GitLab, which entity is primarily responsible for automating tasks in CI/CD pipelines? A) GitLab Jobs B) GitLab Merge Requests C) GitLab Runner D) GitLab Pages Correct Answer: C Explanation: The GitLab Runner executes CI/CD jobs defined in the .gitlab-ci.yml file, automating the process of building, testing, and deploying. Question 18: What is the default name of the main branch in many Git systems, which may also appear in GitLab? A) trunk
B) master (or main) C) dev D) stable Correct Answer: B Explanation: Historically, Git’s default branch was named “master” and newer conventions often use “main.” GitLab supports either as the primary branch. Question 19: Which file in a GitLab repository defines the pipeline stages and jobs? A) .gitignore B) README.md C) .gitlab-ci.yml D) pipeline.conf Correct Answer: C Explanation: The .gitlab-ci.yml file stores pipeline configuration, detailing stages, jobs, and scripts to run. Question 20: What is a common reason for a merge conflict in GitLab? A) Two commits modifying the same lines of code differently B) Expired user roles C) An incorrect .gitlab-ci.yml syntax D) A missing issue board label Correct Answer: A
A) Project variable B) Group variable C) Protected variable D) Pipeline variable Correct Answer: C Explanation: Protected variables hide sensitive data (like API keys) from unauthorized users, ensuring secure access in GitLab CI/CD. Question 24: When might you use GitLab’s “Manual” job trigger in a pipeline? A) When you want the job to run automatically on every push B) When you require user approval or manual intervention before running the job C) When you want to ignore all pipeline failures D) When you need to force a pipeline to run without scripts Correct Answer: B Explanation: A manual trigger requires a user to click “Play” for the job to begin, useful for controlled deployments or reviews. Question 25: Which best practice reduces chaotic merging in GitLab projects? A) Allow direct commits to main without review B) Use feature branches and Merge Requests for each change C) Keep only one commit for the entire project D) Never update local branches from remote
Correct Answer: B Explanation: Feature branches and Merge Requests enable isolated development and proper review before merging to the main branch. Question 26: What is the best way to handle project tasks in GitLab? A) Using unrelated spreadsheets B) Using external source code hosting C) Creating and managing issues within GitLab D) Only relying on email communication Correct Answer: C Explanation: GitLab’s built-in issues system offers an integrated way to track tasks, bugs, and enhancements directly in the project. Question 27: How do you mark a GitLab issue as urgent or high priority? A) Change the repository name B) Assign the Developer role to the issue C) Use labels, such as “high priority” D) Merge it into the main branch immediately Correct Answer: C Explanation: Labels can highlight priority levels, categories, or other attributes to facilitate issue management.
D) A specialized Git command Correct Answer: B Explanation: Milestones organize issues and merge requests within a specific time frame or goal, enabling structured progress tracking. Question 31: Which best describes a Merge Request (MR) in GitLab? A) A request to the administrator for more permissions B) A push notification to external applications C) A method for reviewing and merging code changes D) A built-in server monitoring tool Correct Answer: C Explanation: Merge Requests are used for code review and merging branches back into the main codebase in a controlled, trackable way. Question 32: What is an essential step after approving a Merge Request in GitLab? A) The code automatically merges without any user action B) Manually merging the changes or allowing an auto-merge C) Submitting another Merge Request to confirm D) Restarting the entire pipeline Correct Answer: B Explanation: After an MR is approved, one typically merges it into the target branch (often main). Depending on settings, it may be automatic or require manual approval.
Question 33: Which GitLab feature can help prevent unapproved code merges into the main branch? A) Using a project wiki B) Applying push rules C) Setting up a shared snippet D) Issuing a pipeline artifact Correct Answer: B Explanation: Push rules can restrict direct pushes and enforce approvals, preventing unapproved code from being merged into protected branches. Question 34: How do you typically resolve merge conflicts within a Merge Request? A) By adding a new .conflict file to the repository B) By ignoring the changes from the conflicting branch C) By manually editing conflicting files and committing the resolved version D) By deleting the entire branch Correct Answer: C Explanation: Resolving merge conflicts requires reviewing and manually editing the conflicting files, then committing the resolved changes. Question 35: Which best practice fosters high-quality code reviews in GitLab? A) Creating large, monolithic Merge Requests with multiple features B) Encouraging quick, superficial reviews C) Reviewing small, focused Merge Requests frequently
Question 38: What does DAST (Dynamic Application Security Testing) in GitLab focus on? A) Scanning static code for vulnerabilities B) Checking if your domain is valid C) Scanning a running application for security issues D) Creating new pipelines automatically Correct Answer: C Explanation: DAST checks the live application for security flaws, simulating real-world attacks. Question 39: Why might you use Dependency Scanning in GitLab? A) To ensure your pipeline stages run sequentially B) To detect known vulnerabilities in project dependencies C) To host your static website securely D) To track issue progress across sprints Correct Answer: B Explanation: Dependency Scanning identifies vulnerabilities in the libraries and packages your project depends on, improving security. Question 40: How does GitLab support compliance management? A) By automatically deleting old branches B) Through auditing, traceability of changes, and role-based access controls C) By removing the need for code reviews
D) By restricting repository creation only Correct Answer: B Explanation: GitLab’s audit logs, traceability of changes, and granular role-based access controls help meet compliance requirements. Question 41: Which GitLab feature provides a visual overview of project statistics, such as commits and issue counts? A) GitLab Insights B) GitLab Snippets C) GitLab Pages D) GitLab Runner logs Correct Answer: A Explanation: GitLab Insights offers graphical reports and analytics, giving teams a better understanding of project metrics. Question 42: What is the primary use of GitLab’s custom dashboards? A) To replace the .gitlab-ci.yml file B) To keep track of advanced pipeline scripts C) To compile and display project metrics like issues, merges, and commits D) To store large binary files Correct Answer: C Explanation: Custom dashboards let you gather project metrics and pipeline data in one place for easier monitoring.
C) Email-based verification link D) Captcha forms for every request Correct Answer: B Explanation: Personal Access Tokens are used to authenticate API requests securely, rather than exposing usernames and passwords. Question 46: What is a typical use case for GitLab’s Webhooks? A) Automating user role assignments B) Sending data to external services when certain events occur C) Hosting a database cluster D) Replacing the .gitlab-ci.yml syntax Correct Answer: B Explanation: Webhooks can trigger external services when events (like pushes, MRs) happen, enabling automation and integrations. Question 47: Why might you choose to host GitLab on Kubernetes using GitLab Helm Charts? A) To simplify GitLab’s log management B) To gain container orchestration benefits and easier scaling C) To remove the pipeline feature from GitLab D) To disable all network security in the cluster Correct Answer: B Explanation: Deploying GitLab on Kubernetes with Helm Charts can provide smoother scaling, high availability, and container orchestration features.
Question 48: Which GitLab deployment option packages all necessary components into a single installation? A) Omnibus GitLab B) Minimalist GitLab C) GitLab Shell D) GitLab UI Correct Answer: A Explanation: Omnibus GitLab includes all dependencies required to run GitLab in a single package, simplifying installation and updates. Question 49: What is the main reason for backing up a self-managed GitLab instance regularly? A) To remove old commits B) To easily restore data in case of failures or data loss C) To prevent merges from happening D) To keep the server running in read-only mode Correct Answer: B Explanation: Regular backups ensure that critical repository data, user information, and configuration can be restored after a disaster or system failure. Question 50: Which approach helps optimize GitLab performance for large repositories? A) Using extremely large commit messages B) Frequent garbage collection and repository housekeeping