> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/open-source/use-harness-open-source/repositories-1/cloning.md).

# Cloning

How to clone your Harness Open Source repositories.

## HTTPS <a href="#https" id="https"></a>

1. In your [project](/open-source/use-harness-open-source/administration-1/project-management.md), select **Repositories**, and then select the repository you want to clone.
2. On the **Files** page, select **Clone**.
3. If this is the first time you've cloned this repository, select **Generate Clone Credentials**, and then copy the **Password (API Token)** and store it somewhere secure. Clone credentials are only shown once.

   When you select **Generate Clone Credentials**, Harness Open Source automatically creates an [API token](/open-source/use-harness-open-source/administration-1/user-management.md#generate-user-token) in your account.

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>Tokens carry many privileges; treat your user tokens as passwords and store them securely.</p></div>
4. Copy the Harness Open Source repository URL shown on the **Clone** dropdown, and use it to clone your repository through command line Git or with your preferred Git GUI tool.

   When cloning the repository, you will be prompted for your Harness Open Source user ID and password, which were shown when you generated clone credentials.
5. Once cloned locally, you can work with your Harness Open Source repository as you would with other Git repositories, by creating commits, pushing to the remote, pulling changes, and more.

### Example: Visual Studio Code <a href="#example-visual-studio-code" id="example-visual-studio-code"></a>

Check out this video to learn about working with Harness Open Source repositories in Microsoft Visual Studio Code.

{% embed url="<https://www.youtube.com/embed/kqaAx6zwxAE?si=Loo-xftV6woVpiir>" %}

### Example: GitHub Desktop <a href="#example-github-desktop" id="example-github-desktop"></a>

To clone a Harness Open Source repository in GitHub Desktop:

1. In your Harness Open Source [project](/open-source/use-harness-open-source/administration-1/project-management.md), select **Repositories**, and then select the repository you want to clone.
2. On the **Files** page, select **Clone**.
3. If this is the first time you've cloned this repository, select **Generate Clone Credentials**, and then copy the **Password (API Token)** and store it somewhere secure. Clone credentials are only shown once.

   When you select **Generate Clone Credentials**, Harness Open Source automatically creates an [API token](/open-source/use-harness-open-source/administration-1/user-management.md#generate-user-token) in your account.

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>Tokens carry many privileges; treat your user tokens as passwords and store them securely.</p></div>
4. Copy the Harness Open Source repository URL shown on the **Clone** dropdown.
5. In GitHub Desktop, select **Current Repository**, select **Add**, and then select **Clone Repository**.
6. On the **Clone a Repository** dialog, select the **URL** tab, enter your Harness Open Source repository URL, specify the local path where you want to clone the repo, and then select **Clone**.

   ![Cloning a repository from a URL in GitHub Desktop.](/files/YpVtJwlVdyzO08GBGXwX)
7. On the **Authentication Failed** dialog, enter your Harness Open Source user ID for the **Username**, enter your token for the **Password**, and then select **Save and Retry**.

   ![Providing credentials for the Harness Open Source repository in GitHub Desktop.](/files/cXz9atECe6JD4shsIDn7)
8. Once cloned locally, you can work with your Harness Open Source repository as you would with other Git repositories, by creating commits, pushing to the remote, pulling changes, and more.
