QuestionQ74

VerifiedDevSecOps Pipeline-Code Stage

Jayson Smith works as a DevSecOps engineer at a multinational company based in Tampa, Florida. Sandra Oliver, the company's senior software developer, has uploaded an application to her GitHub repository that may contain security vulnerabilities, and she has shared the repository URL with the DevSecOps team. Jayson wants to analyze the application Sandra developed in order to detect and mitigate security issues in the code, so he needs to clone Sandra's GitHub repository onto his computer.

Which of the following commands should Jayson use to clone another user's GitHub repository to his computer?

Explanation

The correct syntax for cloning a Git repository is git clone <repository-URL>. GitHub repository URLs follow the format https://github.com/USERNAME/REPOSITORY.git, where USERNAME is the account or organization owning the repo and REPOSITORY is the repo name. Running git clone https://github.com/USERNAME/REPOSITORY.git downloads a full copy of that repository, including its history, to the local machine, allowing Jayson to inspect Sandra's application code for vulnerabilities. There is no valid github clone command in Git's CLI, and reversing the URL path segments (REPOSITORY/USERNAME) does not match GitHub's actual repository URL structure.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!