Bamboo remote agent can't execute GIT repo operations with error: RPC failed; result=22, HTTP code = 422

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

    

要約

The build is failing when using a remote agent with the error : "error: RPC failed; result=22, HTTP code = 422", check the below stack trace from <bamboo-agent-home>atlassian-bamboo.log file. 

Caused by: com.atlassian.bamboo.repository.RepositoryException: Cannot fetch branch 'refs/heads/master' from '<repo-URL>' to source directory '<Bamboo-agent-home>/xml-data/build-dir/_git-repositories-cache/c164771460882b932d7f304d1811d5673bfc8ee0'. command [/usr/bin/git -c 'credential.helper=store --file=/tmp/gitCredentials5755204464707531159.tmp' fetch <repo-URL> +refs/heads/master:refs/heads/master --update-head-ok] failed with code 128. Working directory was [<Bamboo-agent-home>/xml-data/build-dir/_git-repositories-cache/c164771460882b932d7f304d1811d5673bfc8ee0]., stderr:
 error: RPC failed; result=22, HTTP code = 422
 fatal: The remote end hung up unexpectedly
 at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.fetch(NativeGitOperationHelper.java:555)
 at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.fetch(NativeGitOperationHelper.java:524)
 at com.atlassian.bamboo.plugins.git.v2.AbstractGitExecutor.fetchCacheWithRetry(AbstractGitExecutor.java:238)
 at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.lambda$checkout$1(GitWorkingCopyManager.java:237)
 at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:293)
 at com.atlassian.bamboo.plugins.git.GitCacheDirectory$LoggingManagedLock.withLock(GitCacheDirectory.java:44)
 at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.checkout(GitWorkingCopyManager.java:235)
 at com.atlassian.bamboo.plugins.git.v2.GitWorkingCopyManager.retrieveSourceCode(GitWorkingCopyManager.java:122)
 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:206)
 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$000(VcsCheckoutTask.java:54)
 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:126)
 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:123)
 at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:112)
 ... 20 more
 Caused by: com.atlassian.bamboo.plugins.git.GitCommandException: command [/usr/bin/git -c 'credential.helper=store --file=/tmp/gitCredentials5755204464707531159.tmp' fetch <repo-URL> +refs/heads/master:refs/heads/master --update-head-ok] failed with code 128. Working directory was [<Bamboo-agent-home>/xml-data/build-dir/_git-repositories-cache/c164771460882b932d7f304d1811d5673bfc8ee0]., stderr: 

環境

Bamboo 8.0.9 with remote agent and GIT 1.8 but the solution listed below will be applicable for all supported Bamboo version

診断

Build execution is successful on the local agent

The repository is accessible and you are able to clone the repository manually on the remote agent

Compared the git version between the local agent and remote agent

原因

Git version 1.8 is used on the remote agent

ソリューション

Upgrade git to a supported version on the remote agent, refer supported platform for more details regarding right version to use. 


最終更新日 2023 年 4 月 3 日

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

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