Linuxbrew-core: Error: Failure while executing: git config --replace-all homebrew.private true

Created on 29 Jun 2018  路  10Comments  路  Source: Homebrew/linuxbrew-core

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • [x] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • [x] have a problem with brew install (or upgrade, reinstall) a single, official formula (not cask)? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • [x] if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?
$ brew config
HOMEBREW_VERSION: 1.6.9-1-ge78a9da
ORIGIN: https://github.com/Linuxbrew/brew
HEAD: e78a9dae2e16d46d3a2b45d66c4d26afb64e2bc4
Last commit: 17 hours ago
Core tap ORIGIN: https://github.com/Linuxbrew/homebrew-core
Core tap HEAD: 05c4c17051d74c61d3a0fe35ea5659c6fe104d57
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_REPOSITORY: /home/linuxbrew/.linuxbrew/Homebrew
HOMEBREW_CELLAR: /home/linuxbrew/.linuxbrew/Cellar
HOMEBREW_CACHE: /home/linuxbrew/.cache/Homebrew
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_FORCE_BREWED_CURL: 1
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_LINKAGE_CACHE: 1
HOMEBREW_LOGS: /home/linuxbrew/.logs/Homebrew
HOMEBREW_TEMP: /home/linuxbrew/.temp
HOMEBREW_VISUAL: /usr/bin/env vim
CPU: octa-core 64-bit merom
Homebrew Ruby: 2.3.3 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2               /bin/ruby
Clang: 6.0 build 600
Git: 2.17.1 => /home/linuxbrew/.linuxbrew/bin/git
Curl: 7.60.0 => /home/linuxbrew/.linuxbrew/opt/curl/bin/curl
Java: N/A
Kernel: Linux 2.6.32-504.el6.x86_64 x86_64 GNU/Linux
OS: Red Hat Enterprise Linux Server release 6.6 (Santiago) (Santiago)
Host glibc: 2.12
/usr/bin/gcc: 4.4.7
glibc: 2.23
gcc: 5.5.0_4
xorg: 20170115_1
$ brew dr
Your system is ready to brew.



md5-1008e60ba230d91da086aceb4f036758



$ brew upgrade git
==> Upgrading 1 outdated package, with result:
git 2.17.1 -> 2.18.0
==> Upgrading git
You must: brew install git
Error: Failure while executing: git config --replace-all homebrew.private true

I found https://github.com/Linuxbrew/homebrew-core/issues/7726 which has been marked 'stale.'

  • What you expected to happen
    No error
  • Step-by-step reproduction instructions (by running brew install commands)
    See above

Most helpful comment

Try running
xcode-select --install
or
git config --global --unset http.proxy
git config --global --unset https.proxy

All 10 comments

$ which -a git
/home/linuxbrew/.linuxbrew/bin/git
$ cat /home/linuxbrew/.linuxbrew/Homebrew/.git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        autocrlf = false
[remote "origin"]
        url = https://github.com/Linuxbrew/brew
        fetch = +refs/heads/*:refs/remotes/origin/*
[homebrew]
        analyticsmessage = true
        analyticsuuid = secret
        devcmdrun = true
        private = true
[branch "master"]
        remote = origin
        merge = refs/heads/master



md5-2e3d8ce297e4020cda313e75a8bde31e



$ git config --replace-all homebrew.private true

$ echo $?
0

I still don't know why the failure was happening, but I was able to go from git 2.17.1 to git 2.18.0 by bypassing brew upgrade git and doing:

$ brew update
$ brew unlink git
$ brew install git

If this workaround is fine, I will not invest more time to fix this. If the problem happens to more people we may need to have a look, but I think we can keep this as-is for the moment.

@iMichka, Thanks. I'm fine with the way I've handled it.

Try running
xcode-select --install
or
git config --global --unset http.proxy
git config --global --unset https.proxy

@Clevelus

The command xcode-select is only relevant to MacOS. This is a Linuxbrew-related thread. I'm not sure how unsetting the proxy would have helped. I have to use a proxy behind my organization's firewall. The proxy has never been an issue in the past, and it appears to no longer be an issue as I recently brew upgraded git from 2.18 to 2.19 with no issues.

I encountered this problem again going from git 2.19.0_1 to 2.19.0_2. And again...

$ brew update
$ brew unlink git
$ brew install git

fixes it.

I was getting this error in macOS:

ChrisOpilityMBP:/ chris$ brew upgrade git
==> Upgrading 1 outdated package:
git 2.18.0 -> 2.19.1
==> Upgrading git 
==> Installing dependencies for git: gettext and pcre2    
==> Installing git dependency: gettext
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Error: Failure while executing; `git config --local --replace-all homebrew.private true` exited with 1.

I needed to fix the xcrun: error: invalid active developer path error on macOS first, by running the following command:

xcode-select --install

After than process completed, everything started working correctly with both git and brew again. :)

Just thought I'd post this here in case anyone else has the same issue. Here's the StackExchange post that helped point to the solution: https://apple.stackexchange.com/questions/254380/macos-mojave-invalid-active-developer-path

@crpietschmann,

This is a Linuxbrew issue, not a Homebrew issue.

Yes. I will close this issue as a lot of people complain about a mac issue on our Linux issue tracker. Please report these kind of issues at https://github.com/Homebrew/brew. Thanks.

Was this page helpful?
0 / 5 - 0 ratings