Start from a repository
Connect a Git account and create a workspace from a repository and branch.
Most workspaces start from a Git repository. Harthelm clones it into /data/app, and pulls and pushes go through
Harthelm's Git proxy with your connection. Your token stays on the platform and never reaches the workspace.
Connect your Git account
You do this once per Git provider.
- Open the account menu at the top right and click Account settings.
- Open Git connections and click Connect … next to your installation's Git provider.
- Sign in at the provider and allow access. Back in the console, the row says "Connected as … since …".
hart cannot make a connection; it uses the one you made in the console.
Create the workspace
- On Workspaces, click Create workspace.
- Set Start from to Git repository. If your installation has several Git providers, pick one.
- Search the repository under Repository and pick it. Repositories you can only read are marked.
- Pick a Branch, or keep the repository's default branch.
- The Name defaults to the repository's name. Choose the plan, availability and visibility, then click Create workspace.
The start shows "Cloning the repository". If the repository already has a harthelm.yml, open the Run panel
and Sync; see Landscapes.
Commit, pull and push
Use git in a terminal, or the editor's Source Control view, as usual. The remote origin points at Harthelm's Git
proxy, which forwards to the provider with the workspace owner's connection.
-
Who you are in Git. Commits made in a terminal carry the name of the person who opened that terminal, and so do commits made with
hart execfor its caller. If you type in a colleague's terminal, the console warns you: commits made there carry their name. In the editor, each person commits as themselves, in the Source Control view and in the terminals of their own browser window; the status bar shows the name. Your email goes on a commit only when your sign-in provider verified it; without a verified email only your name is set, and Git takes the email from agit config --global user.emailset in a terminal of the workspace (kept with the workspace), or else the workspace owner's verified email. Where no person is known, the editor uses the same globaluser.nameanduser.email, or else the workspace owner's. Since 1.2.1; the email rule for terminals andhart execsince 1.2.2. -
Pull. When the branch is behind its upstream, the status bar shows Pull. It fast-forwards
/data/app; it never merges. The same from outside:Terminal hart git status hart git pullIf the pull changed
harthelm.yml, the Run panel offers a Sync.
Reach other repositories
A workspace may only reach the repositories on its allow list. Git access on the rail shows them: the origin, with read and write access, and any you added.
- Open Git access.
- Under Allow another repository, pick the provider and the repository, and choose Read only or Read and write.
- Click Allow repository.
Changing the list needs the Editor role, and you must be able to read the repository at the provider yourself.
The workspace owner
Pulls and pushes use the Git connection of the workspace's owner, at first its creator. If you disconnect your Git account, the workspaces you own can no longer clone, pull or push until you connect again or an admin gives them a new owner. Transfer the ownership under Workspace access; the new owner needs the Editor role and a connection to the same provider.
When it does not work
| You see | What to do |
|---|---|
| "No Git provider is set up on this installation" | Start with an empty workspace, or ask your administrator to connect one |
| "… is not answering" | The Git provider is down or unreachable; try again in a moment |
remote: messages about the access list | The repository is not on the workspace's Git access list, or the access is read only |
| "This workspace has no owner" | The previous owner left the team; a workspace admin offers the ownership to someone with a Git connection |