현상
Bamboo로 빌드하던 중 remote agent에서 오류가 발생하여 fail
Bamboo 로그
17-7월-2019 17:32:39 Warning: failed to checkout source code to directory '/var/atlassian/application-data/bamboo-home/xml-data/build-dir/ATP-TP0-JOB1', trying to recover...
17-7월-2019 17:32:39 Cleaned source directory '/var/atlassian/application-data/bamboo-home/xml-data/build-dir/ATP-TP0-JOB1'...
17-7월-2019 17:32:39 Checking out revision 1b0991116e0117000837d653441a10165590f346.
17-7월-2019 17:32:39 Creating local git repository in '/var/atlassian/application-data/bamboo-home/xml-data/build-dir/ATP-TP0-JOB1/.git'.
17-7월-2019 17:32:39 error: unknown switch `c'
17-7월-2019 17:32:39 usage: git clone [options] [--] <repo> [<dir>]
17-7월-2019 17:32:39
17-7월-2019 17:32:39 -v, --verbose be more verbose
17-7월-2019 17:32:39 -q, --quiet be more quiet
17-7월-2019 17:32:39 --progress force progress reporting
17-7월-2019 17:32:39 -n, --no-checkout don't create a checkout
17-7월-2019 17:32:39 --bare create a bare repository
17-7월-2019 17:32:39 --mirror create a mirror repository (implies bare)
17-7월-2019 17:32:39 -l, --local to clone from a local repository
17-7월-2019 17:32:39 --no-hardlinks don't use local hardlinks, always copy
17-7월-2019 17:32:39 -s, --shared setup as shared repository
17-7월-2019 17:32:39 --recursive initialize submodules in the clone
17-7월-2019 17:32:39 --template <path> path the template repository
17-7월-2019 17:32:39 --reference <repo> reference repository
17-7월-2019 17:32:39 -o, --origin <branch>
17-7월-2019 17:32:39 use <branch> instead of 'origin' to track upstream
17-7월-2019 17:32:39 -b, --branch <branch>
17-7월-2019 17:32:39 checkout <branch> instead of the remote's HEAD
17-7월-2019 17:32:39 -u, --upload-pack <path>
17-7월-2019 17:32:39 path to git-upload-pack on the remote
17-7월-2019 17:32:39 --depth <depth> create a shallow clone of that depth
17-7월-2019 17:32:39
17-7월-2019 17:32:39 Checkout to revision 1b0991116e0117000837d653441a10165590f346 has failed.
Remote Agent 콘솔 로그
INFO | jvm 1 | 2019/07/17 17:32:40 | Caused by: com.atlassian.bamboo.plugins.git.GitCommandException: command [/usr/bin/git remote set-url origin file:///var/atlassian/application-data/bamboo-home/xml-data/build-dir/_git-repositories-cache/32c87e14b3024fcc18f98ff9742cba633c6a21d5] failed with code 128. Working directory was [/var/atlassian/application-data/bamboo-home/xml-data/build-dir/ATP-TP0-JOB1]., stderr:
INFO | jvm 1 | 2019/07/17 17:32:40 | fatal: Not a git repository (or any of the parent directories): .git
INFO | jvm 1 | 2019/07/17 17:32:40 | at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:723)
INFO | jvm 1 | 2019/07/17 17:32:40 | at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:652)
INFO | jvm 1 | 2019/07/17 17:32:40 | at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:643)
INFO | jvm 1 | 2019/07/17 17:32:40 | at com.atlassian.bamboo.plugins.git.GitCommandProcessor.setOrigin(GitCommandProcessor.java:553)
INFO | jvm 1 | 2019/07/17 17:32:40 | at com.atlassian.bamboo.plugins.git.GitCommandProcessor.setOriginToLocalDirectory(GitCommandProcessor.java:610)
INFO | jvm 1 | 2019/07/17 17:32:40 | at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.checkout(NativeGitOperationHelper.java:498)
INFO | jvm 1 | 2019/07/17 17:32:40 | at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.lambda$checkout$1(GitWorkingCopyManager.java:264)
INFO | jvm 1 | 2019/07/17 17:32:40 | at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:293)
INFO | jvm 1 | 2019/07/17 17:32:40 | at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.checkout(GitWorkingCopyManager.java:244)
INFO | jvm 1 | 2019/07/17 17:32:40 | at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.retrieveSourceCode(GitWorkingCopyManager.java:102)
INFO | jvm 1 | 2019/07/17 17:32:40 | at com.atlassian.bamboo.plugins.stash.v2.BitbucketServerWorkingCopyManager.retrieveSourceCode(BitbucketServerWorkingCopyManager.java:90)
INFO | jvm 1 | 2019/07/17 17:32:40 | ... 25 more
원인
remote agent에 git 버전이 낮아서 발생한 에러
remote agent에 git 버전이 낮아서 발생한 에러
해결
#git 제거
yum remove git
#rpm
rpm -Uvh http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
yum remove git
#rpm
rpm -Uvh http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
#install
yum --enablerepo=WANdisco-git --disablerepo=base,updates install git
#확인
git --version