After migrating Bamboo to a new machine all git operations stop working
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.
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
- Make sure git is installed on this new machine
- 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
Powered by Confluence and Scroll Viewport.