Git Repositories
Git repository access allows agents to clone, read, and work with Git repositories during task execution. Errand uses SSH keys to authenticate with your Git hosting service.
How it works
Section titled “How it works”When you install Errand, it automatically generates a unique SSH key pair for Git operations. You grant access to repositories by adding Errand’s public key to your Git hosting service.
There are two ways to do this, depending on how many repositories you need to give Errand access to:
- Option A: Deploy keys — best when you only need access to one or two specific repositories.
- Option B: User account SSH key — best when you need access to many repositories or an entire organisation.
Copy the SSH public key
Section titled “Copy the SSH public key”Whichever option you choose, you’ll need Errand’s public key first:
- Open the Errand UI and go to Settings > Security
- Find the SSH Public Key field
- Copy the full public key value
Option A: Deploy keys (per-repository)
Section titled “Option A: Deploy keys (per-repository)”Deploy keys grant access to a single repository. This is the simplest approach when you only need agents to work with one or two repos.
GitHub
Section titled “GitHub”- Go to your repository on GitHub
- Navigate to Settings > Deploy keys
- Click Add deploy key
- Enter a title (e.g. “Errand”)
- Paste the SSH public key
- Optionally check Allow write access if agents need to push changes
- Click Add key
GitLab
Section titled “GitLab”- Go to your project on GitLab
- Navigate to Settings > Repository > Deploy keys
- Enter a title, paste the SSH public key, and optionally grant write permissions
- Click Add key
Bitbucket
Section titled “Bitbucket”- Go to your repository on Bitbucket
- Navigate to Repository settings > Access keys
- Click Add key
- Enter a label and paste the SSH public key
- Click Add key
Option B: User account SSH key (multi-repository)
Section titled “Option B: User account SSH key (multi-repository)”If you need Errand to access many repositories — or all repositories in an organisation — you can add the SSH key to a user account instead. Any repository that user has access to will be available to Errand.
GitHub
Section titled “GitHub”- Create a new GitHub account to act as your machine user (e.g. “errand-bot”)
- Log in as the machine user
- Go to Settings > SSH and GPG keys
- Click New SSH key
- Enter a title (e.g. “Errand”) and paste the SSH public key
- Click Add SSH key
- Back on your main account, invite the machine user as a collaborator on the repositories it needs access to, or add it as a member of your organisation
GitLab
Section titled “GitLab”- Create a new GitLab account for the machine user
- Go to Preferences > SSH Keys
- Paste the SSH public key and click Add key
- Add the machine user to the projects or groups it needs access to
Bitbucket
Section titled “Bitbucket”- Create a new Bitbucket account for the machine user
- Go to Personal settings > SSH keys
- Click Add key and paste the SSH public key
- Add the machine user to the relevant repositories or workspaces
Write access
Section titled “Write access”If your tasks require agents to push commits, branches, or tags, make sure the key has write access:
- For deploy keys: check the write access option when adding the key
- For user account keys: ensure the machine user has write permissions on the repository (e.g. “Write” or “Maintainer” role)
Without write access, agents can only clone and read from repositories.
SSH hosts
Section titled “SSH hosts”By default, Errand uses SSH for connections to github.com and bitbucket.org. All other hosts use HTTPS.
If you use a different Git hosting service over SSH (e.g. a self-hosted GitLab instance), you can configure additional SSH hosts via the git_ssh_hosts setting.
What agents can do with Git
Section titled “What agents can do with Git”During task execution, agents can:
- Clone repositories to a local working directory
- Read files and browse the repository structure
- Make changes to files in the working copy
- Commit and push changes back to the remote (if write access is enabled)
Troubleshooting
Section titled “Troubleshooting”| Issue | Solution |
|---|---|
| ”Permission denied (publickey)” error | Check that the SSH public key from Settings > Security has been added as a deploy key or to the machine user’s account |
| Host key verification failed | Ensure the Git host is included in the git_ssh_hosts setting, or use HTTPS instead |
| Can’t push changes | Verify that write access is enabled on the deploy key, or that the machine user has write permissions |
| No access to a repository | For deploy keys, check the key is on the correct repo. For user keys, check the machine user has been granted access |