pod repo 更新失败:无法使用路径进行硬重置

pod repo update failed: Cannot do hard reset with paths

当我运行宁

proxychains4 pod repo update

我得到了以下输出

[proxychains] config file found: /usr/local/Cellar/proxychains-ng/4.10/etc/proxychains.conf
[proxychains] preloading /usr/local/Cellar/proxychains-ng/4.10/lib/libproxychains4.dylib
[proxychains] DLL init: proxychains-ng 4.10
[proxychains] DLL init: proxychains-ng 4.10
[proxychains] DLL init: proxychains-ng 4.10
[proxychains] DLL init: proxychains-ng 4.10
[proxychains] DLL init: proxychains-ng 4.10
[proxychains] DLL init: proxychains-ng 4.10
Updating spec repo `master`
[proxychains] DLL init: proxychains-ng 4.10
[proxychains] DLL init: proxychains-ng 4.10
[proxychains] Strict chain  ...  127.0.0.1:1080  ...  api.github.com:443  ...  OK
[proxychains] DLL init: proxychains-ng 4.10
[proxychains] DLL init: proxychains-ng 4.10
  $ /usr/local/bin/git -C /Users/linxi/.cocoapods/repos/master fetch origin
  [proxychains] DLL init: proxychains-ng 4.10
  [proxychains] DLL init: proxychains-ng 4.10
  [proxychains] Strict chain  ...  127.0.0.1:1080  ...  github.com:443  ...  OK
  [proxychains] DLL init: proxychains-ng 4.10
  [proxychains] DLL init: proxychains-ng 4.10
  [proxychains] DLL init: proxychains-ng 4.10
  From https://github.com/CocoaPods/Specs
     1eaabbe..7cc75a2  master     -> origin/master
  [proxychains] DLL init: proxychains-ng 4.10
  $ /usr/local/bin/git -C /Users/linxi/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
  [proxychains] DLL init: proxychains-ng 4.10
  master
  $ /usr/local/bin/git -C /Users/linxi/.cocoapods/repos/master reset --hard origin/master [proxychains] DLL init: proxychains-ng 4.10
  [proxychains] DLL init: proxychains-ng 4.10
  fatal: Cannot do hard reset with paths.
[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

但是,如果我 运行 git 手动

proxychains4 /usr/local/bin/git -C /Users/linxi/.cocoapods/repos/master reset --hard origin/master

一切正常。

我必须使用代理链来连接 git集线器。

我是运行ning cocoapods 1.2.0版/git 2.7.0版.

看起来 proxychains 的命令行输出以某种方式混合在 cocoapods 的脚本中。

添加 -q 选项使代理链 运行 悄悄地解决了这个问题。

proxychains4 -q pod repo update