Flutter and remote git dependencies

I have a dependency that uses git, i.e.:

      url: git://github.com/flutter/packages.git
      path: packages/package1

Locally, it is working perfectly, but in GitHub Actions, it says it can’t find the pubspec.yaml of that dependency.

I tried to add a personal access token to the checkout action, but it doesn’t work.

Maybe is it doing some git commands under the hood and it hasn’t enough permissions?