Skip to content

[Question] Unshallow Git repository in GitLab #2358

Closed
@faina09

Description

@faina09

Describe the bug
I have a simple .net core 3.1 project in VS2019 including GitVersionTask Version=5.3.7 that normally compiles in VS.
I have a GitLab job that compiles too if GitVersionTask is removed from packages

Expected Behavior

compilation by gitlab job

Actual Behavior

I got an error:

C:\Users\xxxx\.nuget\packages\gitversiontask\5.3.7\build\GitVersionTask.targets(46,9): error : GitVersionException: Cannot find commit 37263fb6bcfabee8cff19327eb128314dd5c7be3. Please ensure that the repository is an unshallow clone with git fetch --unshallow. [C:\Gitlab-Runner\builds\3VbVuPNg\0\xxxx\blazor\BlazorApp1\BlazorApp1.csproj]

and cannot continue the compilation.

Possible Fix

  • remove GitVersionTask from packages (!)
  • may be something like this ? (search for "GitVersionTask")

Steps to Reproduce

difficult: it seems to depend from our GitLabRunner for windows application, the previous one was working fine (see Environment)

Context

Environment

  • .net core 3.1
  • gitlab-runner 13.1.1 (working with previous gitlab-runner 11.2.0)
  • Windows Server 2019 STD
  • GitLab Community Edition 13.1.4
  • my CI build contains: dotnet publish BlazorApp1.csproj -c Pre-release

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions