HarmonyOS flutter plugin引用时git报错?

引入path\_provider:

path_provider:
    git:
    url: "https://gitee.com/openharmony-sig/flutter_packages.git"
    path: "packages/path_provider/path_provider"

pub get时报错:

Running "flutter pub get" in ohflutter...
Resolving dependencies...
Git error. Command: `git rev-list --max-count=1 HEAD`
stdout:
  stderr: usage: git rev-list [<options>] <commit-id>... [-- <path>...]
limiting output:
  --max-count=<n>
  --max-age=<epoch>
  --min-age=<epoch>
  --sparse
--no-merges
--min-parents=<n>
--no-min-parents
--max-parents=<n>
--no-max-parents
--remove-empty
--all
--branches
--tags
--remotes
--stdin
--quiet
ordering output:
  --topo-order
--date-order
--reverse
formatting output:
  --parents
--children
--objects | --objects-edge
--unpacked
--header | --pretty
--[no-]object-names
--abbrev=<n> | --no-abbrev
--abbrev-commit
--left-right
--count
special purpose:
  --bisect
--bisect-vars
--bisect-all
exit code: 129
pub get failed
command: "/Users/xxxxx/dev/flutter_flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --directory . get --example"
pub env: {
  "FLUTTER_ROOT": "/Users/xxxx/dev/flutter_flutter",
  "PUB_ENVIRONMENT": "flutter_cli:get",
  "PUB_CACHE": "/Users/xxxx/.pub-cache",
}
exit code: 69
阅读 572
1 个回答

本地尝试了下,是可以正常拉取的。看下是不是git的问题,或者是版本不一致的问题导致的。