본문 바로가기

IT/업무

[Bamboo] error: unknown switch 'c'

문제

Bamboo 에서 Git/Bitbucket 에서 소스코드 체크아웃 시, 아래와 같은 에러 발생

simple	29-Jun-2021 00:53:07	error: unknown switch `c'
simple	29-Jun-2021 00:53:07	usage: git clone [options] [--] <repo> [<dir>]
simple	29-Jun-2021 00:53:07	
simple	29-Jun-2021 00:53:07	    -v, --verbose         be more verbose
simple	29-Jun-2021 00:53:07	    -q, --quiet           be more quiet
simple	29-Jun-2021 00:53:07	    --progress            force progress reporting
simple	29-Jun-2021 00:53:07	    -n, --no-checkout     don't create a checkout
simple	29-Jun-2021 00:53:07	    --bare                create a bare repository
simple	29-Jun-2021 00:53:07	    --mirror              create a mirror repository (implies bare)
simple	29-Jun-2021 00:53:07	    -l, --local           to clone from a local repository
simple	29-Jun-2021 00:53:07	    --no-hardlinks        don't use local hardlinks, always copy
simple	29-Jun-2021 00:53:07	    -s, --shared          setup as shared repository
simple	29-Jun-2021 00:53:07	    --recursive           initialize submodules in the clone
simple	29-Jun-2021 00:53:07	    --recurse-submodules  initialize submodules in the clone
simple	29-Jun-2021 00:53:07	    --template <path>     path the template repository
simple	29-Jun-2021 00:53:07	    --reference <repo>    reference repository
simple	29-Jun-2021 00:53:07	    -o, --origin <branch>
simple	29-Jun-2021 00:53:07	                          use <branch> instead of 'origin' to track upstream
simple	29-Jun-2021 00:53:07	    -b, --branch <branch>
simple	29-Jun-2021 00:53:07	                          checkout <branch> instead of the remote's HEAD
simple	29-Jun-2021 00:53:07	    -u, --upload-pack <path>
simple	29-Jun-2021 00:53:07	                          path to git-upload-pack on the remote
simple	29-Jun-2021 00:53:07	    --depth <depth>       create a shallow clone of that depth
simple	29-Jun-2021 00:53:07	
error	29-Jun-2021 00:53:07	Checkout to revision 49c9f0bcc205f122e6e3616d4d9f9dab311dd5d5 has failed.
simple	29-Jun-2021 00:53:07	fatal: Not a git repository (or any of the parent directories): .git
error	29-Jun-2021 00:53:07	Error occurred while running Task 'Source Code Checkout-git(4)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout.
error	29-Jun-2021 00:53:07		... 20 more

 

원인

git client 의 버전이 낮아서 발생.

 

 

참고

https://confluence.atlassian.com/bamkb/git-error-unknown-switch-option-c-937176953.html