Skip to content

Ep 1.1 Software project - solution doesn't match exercise question #73

@SJaffa

Description

@SJaffa

The question in this exercise is "Which command(s) would you use to get a detailed list of contents of the directory you have just cloned?" but the solution shows how to do the clone, it does not give the answer to the question.

## Exercise: Obtain the Software Project Locally
Using the command line, clone the copied repository
from your GitHub account into the home directory on your computer using SSH.
Which command(s) would you use to get a detailed list of contents of the directory you have just cloned?
::::::::::::::: solution
## Solution
1. Find the SSH URL of the software project repository to clone from your GitHub account.
Make sure you do not clone the original template repository but rather your own copy,
as you should be able to push commits to it later on.
Also make sure you select the **SSH** tab and not the **HTTPS** one -
for this course, SSH is the preferred way of authenticating when sending your changes back to GitHub.
![](fig/clone-repository.png){alt='URL to clone the repository in GitHub' .image-with-shadow width="800px" }
2. Make sure you are located in your home directory in the command line with:
```bash
$ cd ~
```
3. From your home directory in the command line, do:
```bash
$ git clone git@github.com:<YOUR_GITHUB_USERNAME>/python-intermediate-rivercatchment.git
```
Make sure you are cloning your copy of the software project and not the template repository.
4. Navigate into the cloned repository folder in your command line with:
```bash
$ cd python-intermediate-rivercatchment
```
Note: If you have accidentally copied the **HTTPS** URL of your repository instead of the SSH one,
you can easily fix that from your project folder in the command line with:
```bash
$ git remote set-url origin git@github.com:<YOUR_GITHUB_USERNAME>/python-intermediate-catchment.git
```
:::::::::::::::::::::::::

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions