> 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/gitspaces/ides/vs-code-desktop.md).

# VS Code Desktop

Connect to your Gitspaces within VS Code Desktop.

This guide will walk you through the steps to install, setup and start developing in your Gitspaces using this extension.

### Before you begin <a href="#pre-requisites" id="pre-requisites"></a>

Before starting out, ensure that you have the following:

* VS Code Desktop installed ([Install VS Code Desktop](https://code.visualstudio.com/download))
* Harness Open Source Gitspaces extension installed (Refer to the steps below)
* [Remote - SSH extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) must be installed and enabled in VS Code Desktop

#### Installing the Harness open source Gitspaces extension <a href="#installing-the-harness-open-source-gitspaces-extension" id="installing-the-harness-open-source-gitspaces-extension"></a>

To install the “Harness Open Source Gitspaces” extension, here’s what you need to do:

1. Open VS Code and go to the Extensions marketplace.
2. Search for “Harness Open Source Gitspaces Extension”.

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-4f370074acb3d7fc57c29a541a77e82341445e42%2Fvscode1.png?alt=media)
3. Once it appears, click “Install”. ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-df845a61066a9f91d7b088619fd610ea114ebbcc%2Fhoss-9a.png?alt=media)

#### Setting up the extension <a href="#setting-up-the-extension" id="setting-up-the-extension"></a>

Here’s what you have to do to setup the extension in your VS Code Desktop:

1. Once you have installed the extension, you will see the “Harness Open Source Gitspaces” logo in your sidebar.

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-610e2d38a1f6294350d2a29e26d0fc45aa92f8c6%2Fhoss-11.png?alt=media)
2. To set it up, navigate to the extension settings. You need to configure the extension with a token.

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-8ba2f26da135481de28141176aa1316427f50c53%2Fhoss-10a.png?alt=media)

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-ac296d9a954fda22c31fdd748543483fed5058a3%2Fhoss1.png?alt=media)
3. To create a token, go to the Harness Open Source UI and open your profile section.

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-59eb4971a83be130724c00f3d58b35ab55798400%2Fhoss2.png?alt=media)
4. From there, create a new token by giving it a name and setting its expiration. Once created, copy the token from the provided box. *Please ensure you store this token securely, as you will not be able to view it again.*

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-7dede57dbe5ee1f6e7133a9352ecbbf7e3275fc3%2Fhoss3.png?alt=media) ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-686978040f96467e681f728dd2ff8ffaa2a5fd24%2Fhoss4.png?alt=media)
5. Go back to VS Code Desktop and paste the token into the extension's settings tab.

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-f3d8dd96f0121f6ae2bbef53db614140ce1d19d3%2Fhoss5.png?alt=media)
6. And that’s it, your extension is now set up.
7. To verify your account, check the Accounts icon in the activity bar; your Gitspace account should now be listed.

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-f8dca8953702a96e43de95afbef4348df5486908%2Fhoss6.png?alt=media)

#### Opening a Gitspace <a href="#opening-a-gitspace" id="opening-a-gitspace"></a>

Here’s how you can create and open a Gitspace in your VS Code Desktop via Harness Open Source:

1. Start by creating a Gitspace in your Harness Open Source UI.

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-d52dfd02eda82b3df5ae45da5fb06ba4a3dd4c5e%2Fhoss-1a.png?alt=media)
2. After the Gitspace is created, click "Open VS Code Editor" from the Harness Open Source UI.

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-24d11bb107d50c8035d707ba148cb78353a06030%2Fhoss-2a.png?alt=media)
3. You’ll be asked for permission to open VS Code Desktop. Click “Open.”

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-38ce01abc7e617500354d3e697ad4878aa7f48ec%2Fhoss-3a.png?alt=media)
4. You’ll be prompted to open the Gitspace inside your VS Code IDE. Click “Open.”

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-6effe022d460cb6e79e80161e5fe99395bbfb0e2%2Fhoss-4a.png?alt=media)
5. To establish this remote connection, a temporary password will be generated automatically. After the Gitspace is created, you'll be prompted to copy the temporary password. Paste it and follow the prompts to establish the remote connection.

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-bcefa371c2714ff2dd9761c2a97232e5caf14630%2Fhoss-5a.png?alt=media)
6. Once you have set it up, you’ll be able to access your Gitspace remotely inside your VS Code Desktop.

   ![](https://1570309421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwSg8m1jnnOJ6IG7TqFYn%2Fuploads%2Fgit-blob-991324b9a6ebfcf5589234bb54f02f57a670125d%2Fhoss-8a.png?alt=media)

{% @harness-feedback/feedback %}
