【问题标题】:How can I make git or pip bootstrap without errors?我怎样才能使 git 或 pip bootstrap 没有错误?
【发布时间】:2012-08-17 08:43:23
【问题描述】:

当我尝试从 bootstrapper.txt 安装时

$ pip install -r bootstrapper.txt

然后我有以下错误的回溯:

Downloading/unpacking python-keystoneclient==0.1.1 (from -r http://git.ged.ru/ged-thrift-server.git/blob_plain/HEAD:/requirements.txt (line 49))
    Downloading python-keystoneclient-0.1.1.tar.gz (54Kb): 54Kb downloaded
    Running setup.py egg_info for package python-keystoneclient

    warning: no files found matching 'python-keystoneclient'
Downloading/unpacking kazoo==0.2 (from -r http://git.ged.ru/ged-thrift-server.git/blob_plain/HEAD:/requirements.txt (line 50))
    Downloading kazoo-0.2.tar.gz (46Kb): 46Kb downloaded
    Running setup.py egg_info for package kazoo

    warning: no previously-included files matching '*pyc' found anywhere in distribution
    warning: no previously-included files matching '*pyo' found anywhere in distribution
Downloading/unpacking Sphinx==1.1.3 (from -r http://git.ged.ru/ged-thrift-server.git/blob_plain/HEAD:/requirements.txt (line 53))
    Downloading Sphinx-1.1.3.tar.gz (2.6Mb): 2.6Mb downloaded
    Running setup.py egg_info for package Sphinx

    no previously-included directories found matching 'doc/_build'
Obtaining pylib from git+ssh://git@git.ged.ru/pylib.git@a1f66e8dc124165e89fc76dd6f2bf86ccd0527e7#egg=pylib-dev (from -r http://git.ged.ru/ged-thrift-server.git/blob_plain/HEAD:/requirements.txt (line 56))
    Cloning ssh://git@git.ged.ru/pylib.git (to a1f66e8dc124165e89fc76dd6f2bf86ccd0527e7) to ./src/pylib
    Complete output from command /usr/bin/git rev-parse origin/HEAD:
fatal: ambiguous argument 'origin/HEAD': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions

origin/HEAD

----------------------------------------
Command /usr/bin/git rev-parse origin/HEAD failed with error code 128
Storing complete log in /home/ks/.pip/pip.log

http://dumpz.org/246888/ - 这是回溯(来自 /home/ks/.pip/pip.log)。

而我的 pip 版本是:

pip 1.0.2 from /home/ks/python/ged/converters/prosto/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg (python 2.7)

更新:

所以,但是在我将它更新到 1.1 之后 - 它会犯同样的错误..

我应该怎么做才能解决这个问题?

【问题讨论】:

  • 您的git 版本是什么? (使用/usr/bin/git --version查看)
  • 1.1 我记得 - 我现在不在工作机器上。
  • 也许这就是问题所在。请更新您的 git 版本并返回更多信息。 (git 1.1 大约在 7 年前发布:github.com/git/git/tags?after=v1.4.2-rc3&curr=v1.5.6.6
  • 有趣的想法,谢谢。或许。所以我应该从 repo 安装它,而不是通过 apt-get install(因为 - 这个变体大约是 1.1 版本)。

标签: git pip bootstrapper


【解决方案1】:

color.ui 的 git config 设置是什么?

git config --get color.ui

我的设置为“始终”,我得到了同样的错误。

当我把它改成“真”时,

git config --global color.ui true

在我的情况下修复了这个错误。

http://git-scm.com/book/en/Customizing-Git-Git-Configuration#Colors-in-Git

【讨论】:

  • 当我将这个版本更改为最新版本时,我解决了这个问题。 =)
【解决方案2】:

听起来您已经解决了这个问题,但是对于可能遇到此错误的其他任何人,当我尝试在特定提交头处安装远程 git 包时,我遇到了同样的 rev-parse 问题。

我正在运行 pip 1.2.1。

当我将 pip 更新到最新版本(此时为 1.5.6)时,git rev-parse 错误消失了。

【讨论】:

    猜你喜欢
    • 2010-11-17
    • 1970-01-01
    • 2019-04-20
    • 1970-01-01
    • 2016-12-31
    • 2011-12-05
    • 1970-01-01
    • 2013-04-26
    • 2017-05-13
    相关资源
    最近更新 更多