Open Minmus74 opened 8 months ago
I have the same error and I don't have macports.
After checking what the installation script does, I conclude that git does not like having a repository at /usr/bin
, because the invocation to git remote add origin https://github.com/mistydemeo/tigerbrew
fails with error:
fatal: detected dubious ownership in repository at '/usr/local'
Nevertheless, it suggests a possible solution:
To add an exception for this directory, call:
git config --global --add safe.directory /usr/local
After doing as git suggested, I can successfully execute brew update
.
After checking what the installation script does, I conclude that git does not like having a repository at
/usr/bin
, because the invocation togit remote add origin https://github.com/mistydemeo/tigerbrew
fails with error:fatal: detected dubious ownership in repository at '/usr/local'
Makes sense. Permissions checking on directories was tightened up in git a couple of years ago & since /usr/local
is made group writable, it trips git up. One way around out it would be to not make the directory group writeable, with the group set to the user who invoked the install script, but to make the user the owner. I think it's easier just to add the exception unless you're in a multi-user environment with untrusted users in which case you have bigger problem on your hands as you're running an ancient unpatched OS ;-)
This was preventing me from doing a fresh install of Tigerbrew on a fresh installation of 10.4.11. After:
git config --global --add safe.directory /usr/local I was able to invoke "brew update".
To add an exception for this directory, call: git config --global --add safe.directory /usr/local
After doing as git suggested, I can successfully execute `brew update`.
This works for me as well. iMac G4 PowerPC, 10.5.8 with a fresh install of Tigerbrew. Thank you!
I had a new install a few months ago on my G5 with 10.5 that had this same issue, and this solves it.
This also appears to be what Homebrew's postinstall script now does to solve this as well.
j**-m***-power-mac-g4:~ jmont$ brew doctor Please note that these warnings are just used to help the Tigerbrew maintainers with debugging if you file an issue. If everything you use Tigerbrew for is working fine: please don't worry and just ignore them. Thanks!
Warning: Your Tigerbrew is outdated. You haven't updated for at least 24 hours. This is a long time in brewland! To update Tigerbrew, run
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m
Initialized empty Git repository in /usr/local/.git/
fatal: not in a git directory
Error: Failure while executing: git config core.autocrlf false
j***-m -power-mac-g4:~ jmont$ brew install git
Warning: git-2.43.0 already installed
j-m-power-mac-g4:~ jmont$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: (none)
HEAD: (none)
Last commit: never
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://ia904500.us.archive.org/24/items/tigerbrew
CPU: dual-core 32-bit g4e
OS X: 10.4.11-Power Macintosh
Curl: /usr/local/Library/Homebrew/vendor/portable-curl/current/bin/curl
Xcode: 2.5
CLT: N/A
GCC-4.0: build 5370
Clang: N/A
X11: N/A
System Ruby: 2.3.3-222 => /usr/local/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Perl: /usr/bin/perl
Python: /usr/bin/python => /System/Library/Frameworks/Python.framework/Versions/2.3/bin/python
Ruby: /usr/bin/ruby => /Users/jmont
Java: N/A
brew update
. j**-m*-power-mac-g4:~ jmont$ brew update hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranchI didn't get far in the setup process before I encountered this error. I did have macports installed previously, but I followed their documentation to completely remove it off of my system. Let me know if I can provide anything else to help figure this out!