TROUBLESHOOTING GUIDE | GITLAB, PIPELINE, BRANCH
SETUP, IDE WORKFLOW, SCREENSHOTS & SUBMISSION
CHECKLIST | 2026/2027
210 Questions with Answers and Detailed Rationales
100 PERCENT GUARANTEED PASS
INSTANT DOWNLOAD ANSWERS INCLUDED
IMPORTANCE OF THIS DOCUMENT
This comprehensive examination preparation guide has been meticulously developed to help you succeed in the
WGU D522 PYTHON FOR IT AUTOMATION PA TASKS 1 & 2 TROUBLESHOOTING GUIDE | GITLAB,
PIPELINE, BRANCH SETUP, IDE WORKFLOW, SCREENSHOTS & SUBMISSION CHECKLIST | 2026/2027. It
contains 210 carefully selected questions that reflect the most current exam content and testing strategies. Each
question is accompanied by a correct answer and a detailed rationale that explains the underlying
pathophysiology, pharmacology, or clinical reasoning.
Self-Assessment – Test your knowledge and Exam Preparation – Familiarize yourself with the
identify areas requiring further question format and content
study areas
Concept Reinforcement – Deepen your Confidence Building – Develop test-taking
understanding through strategies and reduce
evidence-based exam anxiety
rationales
Time Management – Practice answering
questions under simulated
exam conditions
Review Summary 210 Questions
Foundations - Application - WGU D522 Python FOR IT Automation PA Tasks 1 & 2 Troubleshooting Guide
Gitlab Pipeline Branch Setup IDE Workflow Screenshots & Submission Checklist 2026/2027 Python FOR IT
Automation WGU D522 Undergraduate YEAR 3 / Graduate
All answers with rationales
,Table of Contents
Content Area Questions Key Topics
Gitlab Repository Setup AND 1-35 Pipeline, Gitlab, Script, Python, Fails
Configuration
Branching Strategies AND 36-70 Gitlab, Pipeline, Script, Python, Likely
Pipeline Creation
Python Scripting FOR 71-105 Gitlab, Pipeline, Python, Script, Fails
Automation Tasks
IDE Workflow AND 106-140 Pipeline, Gitlab, Python, Script, Fails
Environment Setup
Screenshot Documentation 141-175 Pipeline, Gitlab, Python, Script, Branch
AND Evidence Collection
Submission Checklist AND 176-210 Gitlab, Pipeline, Python, Script, Fails
Review
TOTAL 210 All questions include answers and detailed rationales
,Section A - Gitlab Repository Setup AND Configuration
Q1.
In a GitLab CI/CD pipeline, a Python script fails only when triggered by a merge request,
but passes on direct pushes to the main branch. Which environmental difference is the
most likely root cause?
A. The merge request pipeline runs in a B. The pipeline lacks the
detached HEAD state, altering relative path CI_MERGE_REQUEST_IID predefined
resolution. variable for authentication.
C. The runner executes merge request D. The merge request branch does not have
pipelines with a restricted set of environment the latest changes from the target branch.
variables.
Correct: C - The runner executes merge request pipelines with a restricted set of
environment variables.
Rationale:Merge request pipelines are designed with stricter security and often exclude
variables that are present in branch pipelines. This can cause scripts to fail when relying on
variables like CI_COMMIT_REF_NAME. While detached HEAD (A) and missing variables (B)
are plausible, the most comprehensive and common cause is the restricted environment (C).
Option D is incorrect because pipelines typically include merged results. This requires
understanding of GitLab CI/CD variable scoping and pipeline types.
Q2.
A Python script uses subprocess.run() to execute a Git command that modifies the
repository. When run locally, it works, but in the GitLab pipeline, it fails with a 'detected
dubious ownership in repository' error. Which Git configuration change is the most
appropriate and safe fix?
A. Add `git config --global --add B. Set the `GIT_STRATEGY` variable to
safe.directory *` to the pipeline script. `clone` instead of `fetch`.
C. Use `git config --system --add D. Disable the ownership check by setting
safe.directory /builds/group/project` before `GIT_DISABLE_SAFE_DIRECTORY` to
the command. `true`.
Correct: C - Use `git config --system --add safe.directory /builds/group/project` before the
command.
Page 3
, Section A - Gitlab Repository Setup AND Configuration
Rationale: The error arises because the repository directory is owned by a different user in
the container. The safe.directory configuration must be set for the specific repository path.
Option C scopes the configuration to the exact directory, minimizing security risk. Option A is
overly broad and considered a security risk. Option B addresses fetching strategy, not
ownership. Option D disables a security feature entirely, which is dangerous and may not be
supported. This tests knowledge of Git's safe.directory mechanism and secure CI/CD
practices.
Q3.
In a GitLab pipeline, a Python script needs to access a private API using a token stored as
a CI/CD variable. The script runs successfully in a job with a protected branch, but fails
when the same branch is used in a merge request from a fork. What is the most likely
reason?
A. Fork pipelines do not have access to B. The fork does not have the same CI/CD
protected variables by default. variables configured.
C. The merge request pipeline runs on a D. The token is masked and cannot be used
different runner that lacks network access. in a fork context.
Correct: A - Fork pipelines do not have access to protected variables by default.
Rationale:Protected variables are only exposed to protected branches and tags, and when a
pipeline runs from a fork, the security context is different. By default, fork pipelines do not
receive protected variables to prevent malicious code from stealing secrets. Option B is
plausible but the root cause is the protection status. Option C is unrelated. Option D is
incorrect because masking only hides the value in logs. This requires understanding of
GitLab's variable protection and fork pipeline security.
Q4.
A developer is troubleshooting a Python script that uses the `requests` library to
download a file from a corporate server. The script works on a local machine but fails in
the GitLab pipeline with an SSL certificate verification error. Which of the following is the
most secure and appropriate solution?
A. Set `verify=False` in the `requests.get()` B. Add the corporate certificate to the
call to bypass SSL verification. runner's CA bundle and set the
`REQUESTS_CA_BUNDLE` variable.
C. Use `pip install certifi` in the pipeline to D. Change the URL to use HTTP instead of
update the certificate store. HTTPS to avoid certificate issues.
Correct: B - Add the corporate certificate to the runner's CA bundle and set the
`REQUESTS_CA_BUNDLE` variable.
Page 4