Redmine Git and source repository integration

Redmine links projects to Git, Subversion and Mercurial repositories so teams can browse changesets and reference or close issues from commit messages. This page covers the decisions, build order, fetch tuning and checks that make the integration reliable on large codebases.

On this page

How Redmine Git integration connects code history to issues

Redmine links code history to issues through its repository module, so a team tracking work in Redmine can see commits, branches and changesets next to the issues they relate to. The module supports Subversion, Git, Mercurial, Bazaar and CVS. This topic covers Git, Subversion and Mercurial, which are the systems most teams ask about. The integration is simple to switch on, but it has four parts that take planning: repository credentials, permissions, fetch load and commit discipline. Each one can make the result look correct while hiding a gap.

Repository access is the first. Redmine must read each repository, and the credentials it uses to do so are stored in the Redmine database as part of the repository configuration. A shared service account that can read every branch makes it impossible to say who saw what through Redmine. Permissions are the second. Redmine's role-based access control decides who can see a project's repository tab and its changesets, and those roles must match what the source host allows. If a private repository is visible in Redmine to people who cannot read it on the host, the Redmine configuration is the weak point. Confirm the role mapping for each project before inviting users.

Fetch load is the third. Redmine reads commit history from the repository to populate changesets, and on large histories that work can slow page loads and background jobs unless the fetch is scheduled and scoped with care. Ask the repository owner how many branches and commits exist and whether the team needs full history in Redmine. Commit message discipline is the fourth, and tooling cannot enforce it alone. Redmine only links a commit to an issue when the message contains a reference in the form the instance recognizes, and it closes issues only when the workflow setup allows it. Agree on the message convention and test it on a sample branch before the rollout.

How commits reach Redmine issues

The flow starts with a developer pushing to the source host, which is the origin of the repository. Redmine then fetches new commits into its own local repository copy, and the Redmine server parses the commit messages for issue references and writes changesets and links to the database. Web and API users see those links on the issue and repository pages. The trust boundary sits around the Redmine server, and the credential that reads the repository is the key item to check, because Redmine must be able to fetch without exposing write access to the source host.

Commits flow from the source host into Redmine's copy, database and user views.

Which repository access model fits your Redmine

This table compares the access choices that shape a Redmine repository setup: remote versus local mirror, shared versus per-project repositories, fetch timing, and mixed SCM use. Read each row for when the option fits and what it asks of your operations team, such as credential handling, disk use, fetch lag and sync jobs. The main takeaway is that a local mirror buys speed and stability at the cost of storage and a sync process you must run and monitor.

DecisionWhen it fitsOperations cost
Remote hosted repository (Redmine reads over the network)Small repositories, a single hosting system that Redmine can reach, and teams that want no extra copy of the code on the Redmine serverRedmine stores credentials for the remote host, browsing depends on network reachability, and slow remote responses show up directly in repository pages
Local mirror on the Redmine serverLarge codebases, unreliable links to the source host, or policies that keep read access on your own networkDisk space grows with history, a sync job must keep the mirror current, and a failed sync leaves views stale until someone fixes it
One repository per projectProjects with separate access rules, separate release cycles, or a clear owner for each codebaseMore repository entries to configure and fetch, and more permission mappings to review when projects change
Shared repository across projectsMonorepos or closely related projects that must reference the same commits and historyCommit visibility follows the shared repository, so project-level access rules need careful checks and clear naming of subdirectories
Scheduled fetchesTeams that accept a known delay between a push and its appearance in RedmineFetch lag equals the schedule interval, and frequent schedules add load on the source host and the Redmine server
Fetches triggered by webhook or by handTeams that need commits to show quickly after a push, or repositories fetched rarelyA webhook needs a secured endpoint and a shared secret, and manual fetches depend on someone remembering to run them
Per-project SCM choice (Git, Subversion, Mercurial)Organizations where teams already use different systems and migration is not plannedEach SCM needs its own client tools on the server, its own upgrade checks, and its own backup and credential handling
Single SCM for all projectsOrganizations standardizing on one system, which keeps server tooling and support simplerTeams on other systems must migrate or keep their code outside Redmine, which adds a project-level change to plan

Build order for Redmine Git integration

This sequence takes a Redmine instance from a confirmed version and client install to a repository that is linked to a project, fetched on schedule, browsable by the right roles, and wired so commit messages can reference and close issues. Each step ends with a check so problems surface before users depend on the link.

  1. Confirm Redmine version and SCM client binaries

    The administrator or DeployOpen engineer confirms the running Redmine version against the supported lines in the Redmine download page, so you know which release notes and security advisories apply. On the Redmine server, confirm that the Git client (and Subversion or Mercurial, if used) is installed, that the Redmine service account can execute it, and that the path is correct in the Redmine SCM settings. Check is complete when the client version command runs as the Redmine service user and returns output without errors.

  2. Create a read-only service identity on the source host

    Create a dedicated account on the Git host (for example GitLab, Gitea, Bitbucket Server or a bare repository over SSH) with read-only access limited to the repositories Redmine should index. Do not reuse a personal developer account, because removing that person would break every fetch. Confirm with your source host administrator which access method is supported and whether the account can be scoped to specific repositories. Check is complete when a clone of the target repository succeeds from the Redmine server using that identity, and a push attempt is refused.

  3. Set up the credential Redmine uses

    Store the credential where Redmine can read it without exposing it in the web interface: an SSH key pair with the private key readable only by the Redmine service user, or an HTTPS token where the source host supports scoped read tokens. Record the key owner, creation date and rotation plan in your operations notes. Confirm host key trust in advance so the first fetch is not blocked by an interactive prompt. Check is complete when a manual fetch run as the Redmine service user completes non-interactively.

  4. Add the repository to a project with the correct SCM type

    In Redmine, open the project settings, enable the Repository module, and add a repository with the Git SCM type. Enter the repository URL or local path and the identity configured in the previous step. Pick the default branch and set the path if the repository is a subdirectory of a larger one. Save the record without enabling any optional settings yet. Check is complete when the repository page appears under the project and shows no connection error.

  5. Run the first fetch and verify the changeset count

    Trigger the initial repository fetch from the project's repository settings or the command-line tool provided by the Redmine SCM integration, and wait for it to finish. Compare the number of imported changesets with the commit count reported by the source host for the same branch. On large codebases, expect the first fetch to take much longer than later incremental fetches, so run it in a maintenance window. Check is complete when the changeset count matches the source host within the expected range for the branches you imported and the log shows no errors.

  6. Confirm the file tree and diff views

    Open the repository browser in Redmine and check that the root directory lists, subdirectories open, file contents render, and a sample commit shows its diff. Test one large file and one file with unusual encoding, since these reveal size and character-set limits early. If the tree is empty or diffs fail, review the repository path and encoding settings before going further. Check is complete when a named file opens at a named revision and its diff matches what the source host shows.

  7. Enable commit keyword handling

    Turn on the setting that lets Redmine scan commit messages for issue references, and confirm which keywords close or reference issues in your Redmine version and configuration. Decide whether closing keywords should apply only to a specific tracker or status, and document the convention for developers. Then push a test commit to a non-production branch that references a test issue number. Check is complete when the commit appears in the issue's history with the correct reference and, if a closing keyword was used, the issue status changed as your workflow defines.

  8. Set roles that may view the repository and schedule fetches

    In the Redmine roles configuration, grant the View changesets and Browse repository permissions only to the roles that need source visibility, and confirm that private projects do not expose repository content to non-members. Then set up a recurring fetch schedule through your operations tooling so new commits appear without manual runs. Check is complete when a test user in a role without repository permission cannot browse the repository, and a user in an authorized role can, and the scheduled fetch has completed at least one run without error.

How the integration changes by repository shape

This is the simplest case: one Redmine project maps to one Git repository, and the repository is small enough that a full clone on the Redmine server is quick to fetch and store. Most of the setup work goes into a dedicated read-only service account on the source host, a repository entry in the project settings, and a decision on how often Redmine refreshes its copy. Commit references and closing keywords work the same way regardless of size, so the main risk is misaligned permissions rather than performance.

  • Access setup: create a read-only deploy key or service account for Redmine and confirm the URL and transport the host supports.
  • Fetch scheduling: a modest repository can usually be refreshed on a fixed interval or through a webhook, so confirm which trigger your host can send.
  • Disk footprint: a full clone stays small, but the host's default branch history still grows with every merge.
  • Permission mapping: compare Redmine roles with the source host's group rights so a user cannot see commits from a repository they cannot open on the host.

Before relying on this setup, check your Git host's documentation for read-only access tokens, how it signs or limits webhook calls, and whether it exposes repository metadata to a service account.

Keeping Redmine Git fetches fast on large codebases

Repository performance in Redmine comes down to how much work each fetch and each page view asks the server to do. Redmine reads new changesets from the repository on a schedule, stores their metadata in the database, and then serves browsing, diffs and changeset pages from the web process. On a large Git history with frequent pushes, every fetch reads more new commits, the local repository copy grows on disk, and a user opening a large tree or a long diff adds load on the same application server that serves issue tracking. Start by writing down the largest repository the integration will touch, how many commits it receives per day, and how many teams will browse it.

The first lever is fetch frequency. Set the repository fetch interval to what the team actually needs, not to the shortest interval the scheduler allows, and confirm with the administrator who owns the Redmine scheduled job how often fetches run and whether they overlap. Keep the local repository copy on fast local storage, not a slow network share, because fetches are read and write heavy. Keep unrelated binary assets such as installers, media files and build artifacts out of tracked repositories, since they inflate the copy Redmine maintains and slow every fetch that touches it. Plan disk capacity for the repository copy as a separate line item from the database and attachment storage, and ask your team how fast the history will grow over the next year.

Before go-live, run a fetch test on a copy of the largest repository in a staging installation that matches production hardware and storage. Measure fetch duration on your own repository, record it at normal and peak commit rates, and watch database load and web process response times while the fetch runs. Repeat the test after any large history import or cleanup. Your Redmine administrator and the repository owner should agree in advance on an acceptable fetch duration and on what happens if it is exceeded, such as changing the interval, moving storage or splitting the repository. Confirm the Git version and Redmine release you test against match the ones in production.

What drives the effort of a Redmine repository integration

This table lists the factors that change the scope, cost and risk of linking Redmine to source repositories, with a practical way to keep each one down. Read it before scoping, because most overruns come from a few drivers that were not measured at the start.

DriverWhy it changes effortHow to keep it down
Number of repositories and projectsEach repository needs its own connection, permission mapping and test fetch, so effort grows with the count.Use one repository per Redmine project where possible and retire inactive repositories before integration.
Total history size and branch countLarge histories and many branches slow the first fetch and make changeset indexing and repository browsing slower.Measure history size and branch count up front, limit tracked branches, and plan the initial fetch outside working hours.
Number of SCM typesGit, Subversion, Mercurial and other types each need their own checks for paths, encodings and hook behavior.Standardize on fewer SCM types where the business allows, and test each type separately before go-live.
Source host access model and identity managementRedmine must read repositories with credentials that match the host's access controls, and mismatched identities cause broken fetches or leaked content.Use a dedicated read-only service account per host, document the access model, and confirm how the host handles SSH keys or tokens.
Permission mapping between host groups and Redmine rolesRepository visibility in Redmine follows project membership, so host groups must be mapped to roles by hand and reviewed.Write the mapping as a table agreed with repository owners, keep the number of roles small, and review it again at each access change.
Commit message policy changes across teamsReferencing and closing issues from commits only works when teams use agreed keywords and issue IDs, which often needs training and some hook or policy changes.Publish a short commit keyword standard, apply it to one pilot team first, and add a check on commits or merge requests where the host supports it.
Staging environment and rollbackTesting fetches, hooks and permissions against a copy of production takes extra setup, but it prevents live data and access problems.Run the integration in staging with a copy of the repositories, and rehearse the rollback steps before the production change.

Securing repository credentials and access in Redmine

Redmine reads your repositories and shows their contents to users, so the integration is only as secure as the account it uses and the roles that gate what people see. The controls below cover the fetch account, stored secrets, permission mirroring, module visibility on shared projects, server protection and change auditing. Confirm exact menu paths and settings against your Redmine version before you apply them.

Dedicated read-only fetch account

Give Redmine its own account on each source host with read-only access to the repositories it links. Do not reuse a developer's login or a deploy key with write rights. Scope the token or key to the specific repositories, and rotate it on a schedule your team can actually run. Ask your Git host which token types exist, what permissions each grants, and whether they expire, because these details differ between hosting platforms and self-hosted servers.

No personal credentials in Redmine

Avoid storing personal passwords or personal access tokens in a repository configuration. When a developer leaves or changes role, a credential tied to them breaks the link or, worse, keeps granting access under a name nobody monitors. Use the service account from the previous card instead. Verify in your version whether repository settings store the credential in the database and who can view or edit it.

Mirror source host permissions onto Redmine roles

Redmine does not inherit access from your Git host. A user who can see a private repository on the host may still see its commits in Redmine if a Redmine role grants the repository view permission, and the reverse is also possible. Map each Redmine project and role to the matching host group, and test with a user who has no host access. Confirm how your Redmine version applies repository permissions to public and private projects.

Restrict repository visibility on shared projects

On public or widely shared projects, decide which roles can see the repository module, changesets and file browser before anyone is added. Anonymous and non-member roles deserve particular attention, because a repository that is safe inside one team can become readable to everyone with a login. Review the role permission matrix after each new project is created, and treat the repository tab as sensitive content in your access review.

Protect stored credentials and configuration

Keep the Redmine configuration file, database and backups readable only by the service account and administrators. Confirm whether repository passwords are encrypted at rest in your database version and where the encryption secret lives. Store that secret outside the application directory and out of version control, and include it in your backup plan with separate access controls. Limit server access to administrators who maintain the integration.

Audit changes to repository settings

Changes to repository URLs, credentials, default branches and role permissions can silently widen what Redmine exposes. Review who holds administrator rights, record each change to repository configuration, and compare role permissions against the source host on a regular cadence. Check whether your installation logs these changes natively or whether you need the web server, database or a plugin to provide an audit trail, and confirm retention with your compliance team.

How to verify that commits update the right Redmine issues

Verification comes down to five checks run against a test project before any team relies on the integration. First, run a manual fetch or repository refresh from the Redmine project's repository settings and confirm that the expected changesets appear in the Repository tab. A missing changeset is the most common early failure, and it usually points to the wrong repository path, a branch that was never fetched, or a credential Redmine cannot use. Then push a test commit whose message references an issue, such as refs #123, and confirm the issue lists the changeset without changing status. Next, push a commit that uses one of the configured closing keywords against a second test issue, and confirm that the issue closes, the status and done ratio change as your workflow defines, and the changeset is linked in the issue history.

Two negative tests matter as much as the positive ones. Create a user who is a project member without repository permission, then check that the Repository tab, file browser, revision diffs and annotations are all hidden from that user, including through direct URLs for files and revisions. Next, deliberately break the credential or the repository URL for the test repository and confirm that the failure appears in the Redmine application log and on the repository page, not as a silent gap where commits quietly stop appearing. Restore the credential afterward and confirm that the missing changesets fill in on the next fetch. Record each result with the commit hash, issue number and time so that a later failure can be compared against a known baseline.

For every closed issue used in the test, open its history and check that the closing changeset is linked, that the commit message and author match what was pushed, and that the status change is attributed to the expected user. Repeat the full test plan after each Redmine upgrade, after any change to the Redmine version line, Ruby or database, and after any change to the source host, such as moving from a self-hosted Git server to a hosted service or changing the repository URL. Ask your implementer to confirm which closing keywords and reference settings are active in the version you run, since these are configuration choices that can differ between releases and between installations.

What to monitor, back up and document after go-live

Once repositories are linked, most failures show up slowly: fetches get slower, copies grow, credentials expire, and a Redmine upgrade quietly changes how commit references are parsed. The cards below cover the checks and records that keep the integration working after the first successful sync.

Fetch success and duration

Track whether scheduled and manual repository fetches succeed, and how long they take, for each linked repository. Redmine reads new changesets through the SCM backend, so a slow or failing fetch means issues will not show the latest commits. Watch for a rising trend on large codebases, since it usually appears before a hard failure. Confirm where Redmine logs fetch errors in your installation, and set an alert on repeated failures for the same repository.

Disk growth of repository copies

For Git, Mercurial and Subversion integrations, Redmine keeps its own local copy of each repository it reads. These copies grow with history and are separate from the source server, so they need their own capacity line in your plan. Record the path of each copy, its size at go-live, and its growth rate over time. Ask your team to confirm whether any repository is set up to keep a full mirror, because that choice changes the footprint considerably.

Database and repository configuration backups

Changesets, the links between commits and issues, and repository settings live in the Redmine database, so a restore of the database alone may be incomplete if the local repository copies are lost. Back up the Redmine database on a schedule, and keep a copy of the repository configuration with it. Test a restore into a separate environment and confirm that changesets appear and fetches resume without errors.

Credential rotation and ownership

Each repository link uses a credential, such as a deploy key, token or service account, with access to the source host. Record which person or team owns each credential, when it expires, and what the rotation steps are. A rotated token that is not updated in Redmine will stop fetches without any change to the Redmine application itself. Review access on each rotation so the Redmine service account has read access only to the repositories it links.

Commit reference test after upgrades

Commit keywords that close or reference issues depend on Redmine's parsing rules, and those rules can change between releases. Before and after any upgrade, including moves within the supported 7.0 line, re-run a fixed set of test commits covering each keyword form your standard uses. Record the expected issue state for each. Upgrade checks should also confirm that plugins which touch repository views still load. Use the Redmine upgrade guide as the reference for the migration steps around this test.

Redmine upgrade guide

Runbook of keywords, repositories and owners

Keep a short runbook that records the commit keyword standard, the list of linked repositories with their SCM type and project, and the named owner for each repository and credential. Include the fetch schedule and the restore procedure. Without this record, a new administrator cannot tell whether a missing changeset is a bug, a misconfigured repository, or an intended exclusion. Review and update the runbook whenever a repository is added, moved or retired.

Common questions about Redmine Git integration

Can our team set up Redmine Git integration without a partner?

Yes, a team with Redmine administration experience and access to its Git hosting server can usually do it in-house, because the core Redmine repository feature is configured through project settings and an administrator's repository setup. The harder part is rarely the Redmine screen. It is deciding how repositories are cloned or fetched, which service account Redmine uses, how hooks or fetch schedules run, and who owns the result after go-live. Ask whether your own staff have time to test fetch behavior, permissions and commit-to-issue linking across every project, and whether they will keep that knowledge after handover. A partner is most useful when the scope spans several repositories or when the security review needs documented evidence.

What does the integration need from our developers and source host administrators?

It needs three groups of input. Source host administrators must provide a read-only service account, network access from Redmine to the repository server, and a decision on whether SSH keys, HTTPS tokens or another method will be used. Developers must agree on a commit message convention, such as the issue reference format they already use, and confirm which branches should be visible in Redmine. Project owners must confirm which repositories map to which Redmine projects. Ask the host administrators to confirm their version, authentication options and branch protection rules, because these decide how Redmine reads history and what it can show.

How does the effort change for a monorepo?

A monorepo usually raises the effort, mainly through fetch time, history size and the number of projects that need to see slices of the same repository. Redmine has to read a large history to show changesets and to resolve issue references, so the first fetch and every incremental fetch cost more as the codebase grows. Plan for a sizing test on a copy of the real repository, a decision on shallow or partial clones where your Git server supports them, and a clear rule for which paths map to which Redmine project. Ask any partner to measure fetch duration on your largest repository before agreeing a fixed scope.

Can Redmine enforce commit message rules?

Redmine does not enforce commit message rules on its own. It reads commit messages after they are pushed and links any issue numbers it finds, and it can change issue status when a message contains a configured closing keyword. Enforcement belongs in the Git host, such as a pre-receive hook, a server-side check or a branch protection rule, which rejects commits that do not match your pattern. Confirm with your Git host administrators which mechanism they support, and agree the exact message format with developers before enabling any rule, so that legitimate commits are not blocked.

Does the integration survive a Redmine upgrade?

The repository configuration is stored in Redmine's database, so it normally carries over when you follow the upgrade procedure, which calls for backing up the database and uploaded files, copying configuration and third-party plugins, and running the database migrations. Any repository-related plugin or custom hook is the main risk, because it may not support the target Redmine version. Redmine 7.0.x is the fully supported line, and 6.1.x and 6.0.x receive only fixes or important security updates. Before upgrading, test repository fetching, changeset display and issue linking on a staging copy, and confirm plugin compatibility with its maintainer.

How do we keep private repositories private in Redmine?

Access is controlled by Redmine's role-based permissions, so a user sees a repository only when the project is visible to them and their role includes repository viewing. Keep the project set to private where needed, limit the repository module to roles that need it, and avoid giving the Redmine service account more rights than read access on the Git host. Store credentials securely, rotate them on a schedule and review who holds administrator rights in Redmine. Confirm with your security team how changesets, diffs and attachments are exposed, since a permitted user may see code that a Git host would otherwise restrict, and test these rules with accounts from each role before go-live.

What drives the total cost of repository integration?

Redmine itself carries no license fee under GPL v2, so the cost comes from people and infrastructure. The main drivers are the number of repositories and projects, the size of their history, the Git hosting options you already run, the access model and the amount of testing your security and compliance reviewers require. Some costs are one-time, such as configuration and testing. Others recur, such as credential rotation, plugin review and upgrade testing. Ask any provider for a written scope that lists each repository, the authentication method, the testing plan and the handover material, so you can compare quotes on the same basis.

How DeployOpen works on this

DeployOpen scopes Redmine repository integration in writing before any work starts, then builds and tests the connection inside your own infrastructure. Each engagement ends with documented settings, verification results and an agreed path for ongoing support.

How we scope

  • We list every repository to link, including its type (Git, Subversion or Mercurial) and where it is hosted.
  • We agree which commit keywords will reference and close issues, and which projects and roles may use them.
  • We confirm the Redmine version, database and hosting so the written scope matches your environment.

How we build

  • We configure repository entries per project and test fetches against a copy of your largest repository first.
  • We set up repository cache and fetch settings so history loads quickly on large codebases, and record the values used.
  • We test issue referencing and closing from commit messages on a non-production instance before enabling it for users.

How we hand over

  • You receive a written record of repository connections, service account permissions, keyword rules and fetch settings.
  • We walk your administrators through adding repositories and troubleshooting failed fetches without outside help.
  • Test commits, expected results and rollback steps are documented so your team can repeat the checks after changes.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Retainers can cover checks after Redmine upgrades, since repository plugins and SCM settings may need retesting.
  • Confirm with us at quote time which repository changes, credential rotations and upgrades the retainer includes.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.