# Sandbox Environment

Your sandbox is the place where you will clone your themes and edit the code. Each Remote Workstation has a backoffice + the sandbox for the themes.

## Connecting with SSH

To connect to your sandbox with the terminal, you will find the command line in the backoffice, when [checking the configuration of your workstation](https://galaxy-cms.gitbook.io/project/remote-workstations/essentials/manage-workstations) in the section "SSH"

<figure><img src="https://3028197268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LYM6a76uZePOTen0dIw-887967055%2Fuploads%2Fni4XNF19LPtP8tENNvrS%2Fssh-configuration.jpg?alt=media&#x26;token=afa91eca-d475-4f67-a9c9-c9c58152957c" alt=""><figcaption></figcaption></figure>

Here is an example connecting to a workstation with the alias "`my-alias`"

When connecting, you will see have access to the folder `integration`, where you will be able to git clone your themes

```shell-session
$ ssh user@my-alias.tc.exo7d.us -p 2222 -A
 _____               _           
| ____|_  _____   __| |_   _ ___ 
|  _| \ \/ / _ \ / _` | | | / __|
| |___ >  < (_) | (_| | |_| \__ \
|_____/_/\_\___/ \__,_|\__,_|___/

This is an Exodus Sandbox development environment for Galaxy.

$ [user@my-alias:~] $ ls
integration  integration-shared  integration-versions

$ [user@my-alias:~] $ cd integration
$ [user@my-alias:~/integration] $ git clone XXXXXXXXX
```

Because you connected with the option `-A`, which enables ForwardAgent, your local SSH key is forwarded and your Gitlab / Bitbucket will be able to recognize you

<details>

<summary>Enabling SSH Agent Forwarding issues</summary>

In case this does not work, some first steps to debug could be to follow Github article about SSH Agent Forwarding \
<https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding#your-local-ssh-agent-must-be-running>

They have a section 2 things to check:

* "**Your local `ssh-agent` must be running**"
* "**Your key must be available to ssh-agent**"

</details>

{% hint style="info" %}
As you will often work on your remote workstation, remembering the command line/copy pasting it each time could be difficult.\
You can create a bash alias, but we advise you to use an SSH Config File :bulb:
{% endhint %}

## Editing code

To edit code, please refer to the guidelines from your IDE to work remotely. At xo7, most of us use Visual Studio Code official extension.

{% content-ref url="vsc-remote-ssh-extension" %}
[vsc-remote-ssh-extension](https://galaxy-cms.gitbook.io/project/remote-workstations/developers/vsc-remote-ssh-extension)
{% endcontent-ref %}

## Git configuration

By default, your sandbox has no custom git configuration (no user set, no alias)

The first thing to do is to set your user name and email

```shell-session
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
```

Feel free to add your other usual configurations, such as aliases, etc.

{% content-ref url="nvm-node-version-manager" %}
[nvm-node-version-manager](https://galaxy-cms.gitbook.io/project/remote-workstations/developers/nvm-node-version-manager)
{% endcontent-ref %}
