Some projects span multiple repositories - microservices architectures, shared libraries, or related services that need to run together. Ona lets you clone additional repositories into your environment automatically. This is valuable for agents too. When Ona Agent needs to make coordinated changes across repositories, having them in one environment enables atomic commits and easier testing.Documentation Index
Fetch the complete documentation index at: https://ona.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Using Dev Container Configuration
The Dev ContaineronCreateCommand allows you to clone additional repositories when your environment starts. This method is particularly useful when you want to maintain the repository setup as part of your Dev Container configuration.
Add an onCreateCommand entry to your .devcontainer/devcontainer.json file:
Using Ona Tasks and Services
Alternatively, you can use Ona’s Tasks and Services to clone additional repositories. This approach offers more flexibility and can be combined with other automation tasks. Add a task to yourautomations.yaml file:
Best Practices
When working with multiple repositories, consider the following best practices:- Clone repositories to
/workspaces: Always clone additional repositories to/workspaces/repo-name(whererepo-namein that example is the name of your repo). Do this to avoid git tracking issues within your main repository - Use SSH keys or personal access tokens for authentication with private repositories
- Organize repositories in a consistent directory structure under
/workspaces - Configure Git identity globally to ensure consistent commits across repositories
Working with Multiple Repositories
Once your environment is set up:- Navigate between repositories using the file explorer or terminal
- Make changes in each repository independently
- Commit and push changes to each repository separately
Troubleshooting
Authentication failures
Authentication failures
Ensure you have the correct permissions and authentication method.
Path issues
Path issues
Use absolute paths when necessary.
Repository not found
Repository not found
Verify repository URLs and access permissions.