fatal: Not a git repository, GIT_DISCOVERY_ACROSS_FILESYSTEM not set
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Server* 製品のサポートは 2024 年 2 月 15 日をもって終了します。Server 製品を利用している場合は、Atlassian Server のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
問題
The following exception appears when:
- Remote agent perform checkout
OR - Bamboo runs Change Detection as part of a Plan or for its automated actions
Cannot fetch branch 'BRANCH_NAME' from 'REPO_URL' to source directory '/var/atlassian/application-data/bamboo/xml-data/build-dir/_git-repositories-cache/HASH'. command /usr/local/bin/git fetch URL +refs/heads/develop:refs/heads/develop --update-head-ok failed with code 128. Working directory was [/var/atlassian/application-data/bamboo/xml-data/build-dir/_git-repositories-cache/HASH]., stderr: fatal: Not a git repository (or any parent up to mount point /mnt) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
診断
- Check if there is any special character in the branch name
- Run the command "locale" to confirm if it is using UTF-8 or en_US.UTF-8
Please run the following command to check that the specific cache directory and its contents exist and are accessible by the Bamboo user:
ls -alR <bamboo-home>/xml-data/build-dir/_git-repositories-cache/HASH/.git
Please be sure to replace the filepath with the path in the error message.
原因
- Remote agent is not using file encoding UTF-8
- The machine is not using UTF-8 or en_US.UTF-8. The configured locale does not work well in the machine
- This is caused by Bamboo server being unable to access the
.git
directory in the local repository cache
ソリューション
Restart remote agent with the following file encoding setting in
REMOTE_AGENT_HOME/conf/wrapper.conf
file:wrapper.java.additional.3=-Dfile.encoding=UTF-8 wrapper.java.additional.4=-Dsun.jnu.encoding=UTF-8
- Configure the machine locale to be UTF-8 or en_US.UTF-8
- Delete the affected local cache directory in Bamboo server
最終更新日 2019 年 6 月 21 日
Powered by Confluence and Scroll Viewport.