Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Source code checkout failure in Bamboo

Ashish Nigam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 30, 2023
 
  
30-Oct-2023 13:16:21Fetching 'refs/heads/bugfix/191.4/SON5-69192-add-new-usm-oss-setting-attach-cells-to-ret-from-oss-data-always-set-to-true' from 'ssh://git@my-bitbucket.abc.com:7999/son5/son5.git'.
30-Oct-2023 13:16:21error: cannot open .git/FETCH_HEAD: Permission denied
30-Oct-2023 13:16:21 
30-Oct-2023 13:16:21Cannot fetch branch 'refs/heads/bugfix/191.4/SON5-69192-add-new-usm-oss-setting-attach-cells-to-ret-from-oss-data-always-set-to-true' from 'ssh://git@my-bitbucket.abc.com:7999/son5/son5.git' to source directory '/home/bamboo/bamboo-agent-home/xml-data/build-dir/_git-repositories-cache/a5325ea61a0162099755c033861f1147d03a4c12'. command [/usr/bin/git fetch ssh://9744473b-1e25-4ab0-9f08-a9f1ff9b5f05@127.0.0.1:38645/son5/son5.git +refs/heads/bugfix/191.4/SON5-69192-add-new-usm-oss-setting-attach-cells-to-ret-from-oss-data-always-set-to-true:refs/heads/bugfix/191.4/SON5-69192-add-new-usm-oss-setting-attach-cells-to-ret-from-oss-data-always-set-to-true --update-head-ok] failed with code 255. Working directory was [/home/bamboo/bamboo-agent-home/xml-data/build-dir/_git-repositories-cache/a5325ea61a0162099755c033861f1147d03a4c12]., stderr:error: cannot open .git/FETCH_HEAD: Permission denied

1 answer

0 votes
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 31, 2023

Hello Ashish,

Welcome to Atlassian community.

From the error which you have provided I can see the exception >  "error: cannot open .git/FETCH_HEAD: Permission denied"

 

The Git “Cannot open .git/FETCH_HEAD: Permission denied” error occurs when you try to pull code from a remote repository when the .git/ directory in your server file system is inaccessible to your current user which is running the build.

I am not sure if you are running this on local or remote agent, but if you are running this build on local agent, make sure the user which is running the Bamboo service has read/write access to the above folder. For remote agent you need to provide the similar permission for the user which is running the remote agent. 

Regards,

Shashank Kumar

**please don't forget to Accept the answer if your query was answered**

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events