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.log

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,52.12.123.12' (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.

最終更新日 2018 年 5 月 14 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.