After migrating Bamboo to a new machine all git operations stop working

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

Summary

After migrating the Bamboo server to a new VM, all git operations stop working and a message similar to the following one appears at the UI

Unable to detect changes
This error may have occurred due to an authentication issue with Bitbucket Server. Save the repository configuration to refresh the authentication details or manually add the access key visible in "Advanced" section to Bitbucket Server.
(com.atlassian.bamboo.plugins.stash.repository.StashRepositoryException : com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.executor.CancelException: /usr/bin/git could not be started: command [/usr/bin/git version] failed with code -1. Working directory was [/]. [])


Diagnosis

The following message can be found at the atlassian-bamboo.log  file

2021-05-26 05:23:12,296 INFO [9-BAM::PlanExec:pool-16-thread-3] [DefaultErrorHandler] Recording an error: Unable to detect changes : PROJ-PLAN : com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.executor.CancelException: /usr/bin/git could not be started: command [/usr/bin/git version] failed with code -1. Working directory was [/]. []

Cause

This problem might be caused by the fact that Git is not installed on the new server or the executable is pointing a wrong path.

Solution

  1. Make sure git is installed on this new machine

  2. Make sure the Git executable is pointing to the correct path at the Cog icon>Overview>Server capabilities  menu.



Last modified on May 26, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.