致命的:模糊的参数'v':未知的修订或路径不在git的工作树中

时间:2016-11-02 08:31:53

标签: git bitcoin bitcoind

我正在使用gitian-build为我自己的区块链(来自peershare的模板)构建我的二进制文件,该区块链在我的localhost上运行。当我为gitian-builder执行命令git pull时,它会给出超时错误,我不知道为什么(我已经代理工作了)。当我执行命令

explorer@PC:~/gitian-builder$ ./bin/gbuild --commit abc=v${VERSION} ../abc/contrib/gitian-descriptors/gitian-linux.yml

其中“abc”是区块链名称,它给我这样的错误

 remote: Counting objects: 1, done.
 remote: Total 1 (delta 0), reused 0 (delta 0)
 Unpacking objects: 100% (1/1), done.
 From https://bitbucket.org/abc/abc
    1eed3dd..8316d74  master     -> master
 fatal: ambiguous argument 'v': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'
    ./bin/gbuild:272:in `block in <main>': error looking up commit for    tag v (RuntimeError)
    from ./bin/gbuild:256:in `each'
     from ./bin/gbuild:256:in `<main>'

我的./bin/gbuild文件来自https://github.com/devrandom/gitian-builder/blob/master/bin/gbuild而我的gitian-linux.yml看起来像是---

 name: "abc"
 suites:
 - "precise"
 architectures:
 - "i386"
 - "amd64"
  packages:
  - "g++"
  - "git-core"
  - "unzip"
   - "pkg-config"
   - "faketime"
   - "zlib1g-dev"
   - "qt4-qmake"
   - "libqt4-dev"
   reference_datetime: "2011-01-30 00:00:00"
   remotes:
  - "url": "https://bitbucket.org/abc/abc.git"
      "dir": "abc" 
      files:
          - "abc-deps-linux32-gitian-r5.zip"
          - "abc-deps-linux64-gitian-r5.zip"
          - "boost-linux32-1.55.0-gitian-r1.zip"
         - "boost-linux64-1.55.0-gitian-r1.zip"
        script: |
         STAGING="$HOME/install"
         OPTFLAGS='-O2'
         BINDIR="${OUTDIR}/bin/${GBUILD_BITS}" # 32/64 bit build specific output directory
        TEMPDIR="$HOME/tempdir"
        export TZ=UTC
        export LIBRARY_PATH="$STAGING/lib"
        export PATH="$STAGING/bin:$PATH"
        mkdir -p ${BINDIR}
                            .... and more 

请解决错误我如何摆脱它 谢谢

1 个答案:

答案 0 :(得分:0)

Gitian只针对有效的git标签构建。比特币存储库使用格式为

的标签
v0.13.1

注意领先v。由于您没有共享您的存储库,我无法告诉您正确的版本字符串是什么。但您可以使用git存储库中的abc命令列出正确的标记名称,例如,

$ git tag
0.0.1
0.0.2
0.0.3
0.0.4
0.1.0

如果在上面的示例中,您标记了没有前导v的版本,请将其从gitian-build命令中删除,即

$ ./bin/gbuild --commit abc=${VERSION} ../abc/contrib/gitian-descriptors/gitian-linux.yml

如果您的abc存储库中还没有任何标记,请阅读有关git tags here的更多信息。