Why Use Service Accounts for Automations
A service account provides:- Identity in your SCM - Automations appear as the service account in commits, PRs, and comments
- Separation of agent and human activity - Clearly differentiate between automation work and human work
- Consistent permissions - Automations run with predictable access regardless of individual user availability
When to Use Service Accounts
| Scenario | Recommended Account |
|---|---|
| Event-driven automations (PR triggers) | Service account |
| Time-based automations (scheduled jobs) | Service account |
| Shared ownership automations | Service account |
| Organizational processes | Service account |
| Personal workflows | Your user account |
| One-time tasks | Your user account |
| Testing automations | Your user account |
Configuring an Automation to Use a Service Account
When creating or editing an automation:- In the Run as section, select the service account from the dropdown
- Ensure the service account has Git authentication configured
- Save the automation

Selecting a service account for an automation
Requirements
Before using a service account for automations:- Create the service account - See Creating a Service Account
- Configure Git authentication - The service account needs a Personal Access Token for your SCM. See Git Authentication
- Verify permissions - Ensure the service account has access to the target repositories
- Check email verification policies (GitLab) - If your organization requires verified emails for commits, see Platform-Specific Considerations
GitLab users: If your organization requires verified company domain emails for Git commits, GitLab service accounts will not work. You must use a PAT from a dedicated real GitLab user account with a verified email. See GitLab Email Verification Limitation for details.
Troubleshooting
Automation Fails with Authentication Errors
- Verify the service account has Git authentication configured
- Check the Personal Access Token is still valid
- Ensure the token has required scopes (
repo,read:user,user:email,workflowfor GitHub)
Service Account Not Appearing in Dropdown
- Verify you have permissions to view service accounts
- Check the service account was created successfully
- Refresh the page
Permission Denied on Repository
- Verify the Personal Access Token has access to the target repository
- Check the token scopes include write permissions
- Ensure the service account is in a group with runner access
Commits Rejected Due to Email Verification (GitLab)
Symptoms: GitLab rejects pushes with errors about unverified emails, email domain policies, or commit author validation. Cause: Your organization has policies requiring verified company domain emails for all commits. GitLab service accounts cannot have verified emails, so commits from these accounts are rejected. Solution:- Create a dedicated real GitLab user account with a company email (e.g.,
[email protected]) - Sign in to GitLab and verify the email address
- Generate a Personal Access Token from this dedicated account
- Update your Ona service account’s Git authentication to use this new PAT