I am trying to push a change to gitlab, but my gitlab pipeline is failing due to below error.
fatal error in object: unshallow <commit-hash>
I dont have access to the gitlab build pipeline, so cant update anything there. The only thing I know from the logs is that it says "Fetching changes with git depth set to 50".
Is there a way I can resolve this issue in my local git?
UPDATE: As per the answers, I tried changing the GIT_DEPTH to 760 instead of the default 50 and it worked. I had to increase it to a level that the unshallow commit comes in my clone. But I am not sure if this will resolve the issue permanently. Please suggest.
CodePudding user response:
This is similar to issue 351976, where the user had work around this issue by increasing the GIT_DEPTH
of the secret detection job.
So check your number of changes fetched during clone, and check if there is a shallow clone:
The following example makes the runner shallow clone to fetch only a given branch; it does not fetch any other branches nor tags.
variables: GIT_DEPTH: 10 test: script: - ls -al