Docs ยท Workspaces
Remote workspaces
Remote workspaces allow a workspace to be used on more than 1 environment. This is done via a Git repository: changes on one repository can be pushed to the remote repository so they can be pulled onto another.
Connecting a workspace to a remote
You can connect an existing workspace to a remote repository OR connect to the remote as part of the workspace creation process. In either case you should follow the following steps:
- Log in to your Git host provider and create a new blank respository.
- Generate a PAT token. For example on Github navigate to Profile -> Settings -> Developer settings -> Personal access tokens -> Fine-grained tokens. Here create a new token linked to the repository and store it somewhere safe (you cannot retrieve it later so make sure you save it now). Give the token the following permissions:
- Administration: Read-only
- Contents: Read and write
- Metadata: Read-only
- Either create a new workspace or use the workspace menu on an existing workspace and select
Add remote repository. - Input the repository URL (we will validate it)
- Input the token in the SSH key field
- Click connect.
This can take some time - if it takes longer than 30 seconds (or you close the modal) we'll send you a notification once it's complete.
After successfully connecting to a remote you will see some extra features appear in the user interface.
Pushing and pulling commits
Once a workspace is configured with a remote you can push committed changes to the repository. Ideally commits should be pushed immediately to avoid conflicting commits from different environments (although you can push commits at any point). Once a commit has been pushed to the remote repository it becomes available to all other environments using that workspace to pull from the remote.
- To push commits go to the version control tab in the main sidebar and expand the
Commitspanel and click thePUSHbutton. Alternatively selectedCOMMIT & PUSHwhen committing a change. - To pull commits from the remote go to the version control tab in the main sidebar and expand the
Remotepanel and click thePULLbutton.
Using a remote workspace on another environment
The purpose of using remote workspaces is so you can clone that workspace into multiple environments. To clone an existing remote workspace onto another environment follow these steps:
- Open the workspace menu and select
New workspace. - Switch to the
FROM REMOTEtab. - Input the repository URL and SSH key
- Press
CONNECT.
This can take some time - if it takes longer than 30 seconds (or you close the modal) we'll send you a notification once it's complete.