While configuring bitbucket pipelines to deploy repo in google instance via ssh I noticed that git fetch does take lot of time or does not even complete. Does anyone know why it happens ?
Snippet of bitbucket command
COMMAND: >
cd ../../services;
if # something ; then
sudo git clone < clone link> &&
cd <cloned directory >
sudo git fetch -a &&
sudo git checkout $BITBUCKET_BRANCH &&
sudo docker compose up -d --build
Eventually I commented out fetch command and it still worked.
I figured out that during fetch it expects bitbucket password.
Can someone tell me how to provide password ? I have tried URLS for fetch as well but still does not work. The only way I see is the delete the repo and recreate it each time.