Unable to checkout Git Code from AWS Codecommit when Bamboo installed on Linux Distribution
Unable to checkout Git Code when using CentOS.
The following appears in the atlassian-bamboo
com.atlassian.bamboo.plugins.git.GitCommandException: command [/usr/bin/git -c credential.helper= -c 'credential.helper=store --file=/var/cache/bamboo/temp/gitCredentials1144011424118739094.tmp' ls-remote ssh://git.amazonaws.com/v1/repos/UMO] failed with code 128. Working directory was [/var/cache/bamboo/temp]., stderr: Could not create directory '/usr/share/bamboo/.ssh'. Warning: Permanently added 'git.amazonaws.com,22.214.171.124' (RSA) to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:703) at com.atlassian.bamboo.plugins.git.GitCommandProcessor.getRemoteRefs(GitCommandProcessor.java:481) at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.lambda$getRemoteRefs$1(NativeGitOperationHelper.java:585) at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:38) at com.atlassian.bamboo.util.CallableResultCache$1.load(CallableResultCache.java:34) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
- Bamboo is on Linux (It will impact all Linux Distributions) and connecting Git on AWS using SSH.
- You need to have ssh private and a public key configured for the bamboo user and ssh config file as per AWS documentation is needed too.
Home directory for the bamboo user was missing due to which it was failing.
Make sure that you have the home directory of the user (used to start the Bamboo) configured and have the ownership and the privileges as well.