Brew command throwing github related error - homebrew

all my brew commands (update, config, docker et al) are throwing below error on my Mac v10.14.2:
brew update
fatal: could not read Username for 'https://github.com': terminal prompts disabled
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Error: homebrew/homebrew-dupes does not exist! Run 'brew untap homebrew/homebrew-dupes'
homebrew/homebrew-x11 does not exist! Run 'brew untap homebrew/homebrew-x11'
I have already tried the below options:
1. brew untap homebrew/homebrew-x11 -> gives the same error as reported.
2. brew untap homebrew/homebrew-dupes -> gives the same error as reported.
3. brew resintall fails with the same error as reported at Failed during: /usr/local/bin/brew update --force
brew related entry in ~/.bash_profile:
alias brew='brew update && brew'
Any suggestion on how to get rid of this issue?

It looks like https://github.com/Homebrew/homebrew-dupes/ does not exist or removed so untap the current repository and then find another working git repository to update brew.
brew untap homebrew/homebrew-dupes
brew update

It seems like errors related to missing git repos (or cask) trigger the following error:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
It's an error triggered by git, hence the git-related prompt.
That prompt message upon failing to fetch a no longer existing repo from git was introduced with this pull-request at Homebrew. The explanation for it is documented in the pull-request description.
"Untapping" the cask as prompted will get you past this error, as Jemal Miftah pointed out.

Related

Phraseapp: Command not found

I'm new to using phraseApp and fastlane. I was trying to pull the latest changes in Phraseapp using fastlane. After calling "phraseapp_all" I get an error message Exit status of command 'cd ../Project/Resources && phraseapp pull' was 127 instead of 0. sh: phraseapp: command not found.
I tried reinstalling phrase but no luck. Any idea on how to fix this?
Use brew install phraseApp instead of phrase only.
I thought that phraseApp was just renamed to phrase. They were somewhat different.
This worked for me.
brew tap phrase/brewed
Install phraseapp client:
brew install phrase/brewed/phraseapp

Unable to rund `brew doctor` or `brew list --cask` due to Cask error

I just installed a new Cask and afterwards, I ran brew doctor, which returns Error: Cask 'java' is unreadable: undefined method undent' for #String:0x00007f8d77a0ae40`.
Java doesn't appear under brew list, so I tried brew list --cask, but got the same error message again. Running /usr/libexec/java_home -V returns:
Matching Java Virtual Machines (1):
1.8.0_121, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
I'm not sure what the issue is. Do I need to re-install Java?
I cleared the error by deleting the update .pkg file in /usr/local/Caskroom/java/1.8.0_121-b13,e9e7ea248e2c4826b92b3f075a80e441/

brew doctor Error: "No available formula with the name "pkg-config" "

I just installed Homebrew on Windows using the Linux Bash Shell but I have this error when I run brew doctor :
Error: No available formula with the name "pkg-config"
what can i do?
First, update Homebrew so it is pulling from the right resources: brew update
Run brew doctor again.
If the same error occurs, try doing a brew search pkg-config and see which results come up. I've had cases where the path to the package was different than usual. Pick one of the search results, and then do a brew install with the package path from the search results: brew install /homebrew/searchresultpath/pkg-config
Hopefully the correct path for the extension will solve your problem.

"Unlinked kegs in your Cellar". How do I remove them?

After installing and uninstalling some programs through brew and brew cask, now I get brew doctor saying "unlinked kegs in your Cellar".
It suggests to link them, to avoid build trouble with later brews, but instead I'd rather delete them, as they're leftovers from brew programs or formulas that I don't use anymore.
How or where do I remove these? (I don't even know what a keg, or the Cellar, is)
Run:
brew remove packageName
for each unlinked package.
2018 Update
$ brew link --help
If --overwrite is passed, Homebrew will delete files which already exist
in the prefix while linking.
$ brew link --overwrite [package]
$ brew doctor
running brew link will bring up optional commands that you can use, along with that you'll need an argument to go with it or it'll prompt you with an error saying just that.
so I would suggest running:
brew doctor
This will give you the:
'Warning: You have unlinked kegs in your Cellar...'
message
underneath this message it will prompt which kegs are there with the potential problem.
My personal warning was:
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
mongodb
brew link
read your options, so you understand what is happening with this command.
brew link --dry-run <yourArgument>
Homebrew will list all files which would be linked or which would be deleted by brew link --overwrite, but will not actually link or delete any files.
brew link --overwrite <yourArgument>
This will execute what the dry-run did, for real this time.
My experience with this was:
cli cmnd:brew link --overwrite mongodb
cli response: Linking /usr/local/Cellar/mongodb/3.2.7... 0 symlinks created
brew doctor
Finally I ran this command and my response no longer had issues.
cli response: Your system is ready to brew.
I figure it will either make the link or if there is none to be had it will just delete the file; which was a previous solution above (this just seems to follow the brew cli prompts vs. just "smashing" the issue with a hammer).
I hope this helps you!
don't cry over spilt code, keep supporting the community.
After installing homebrew on Mac I had the following error:
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
libtool
libksba
libyaml
libgpg-error
After running brew link libtool I would get the following error:
$ brew link libtool
Linking /usr/local/Cellar/libtool/2.4.6_1...
Error: Could not symlink include/libltdl
/usr/local/include is not writable.
But as it turned out I didn't have a folder /usr/local/include at all.
So I created it. And then changed the owner and group of the new folder to match the other folders in /usr/local. The next error was the same for /usr/local/lib, so I followed the same process.
After creating those two folders, brew link [package] worked.
brew 1.9.0
brew cleanup [options] [formula|cask]
Remove stale lock files and outdated downloads for all formulae and casks, and
remove old versions of installed formulae. If arguments are specified, only do
this for the given formulae and casks.
--prune Remove all cache files older than specified
days.
-n, --dry-run Show what would be removed, but do not
actually remove anything.
-s Scrub the cache, including downloads for
even the latest versions. Note downloads
for any installed formula or cask will
still not be deleted. If you want to delete
those too: rm -rf "$(brew --cache)"
--prune-prefix Only prune the symlinks and directories
from the prefix and remove no other files.
-v, --verbose Make some output more verbose.
-d, --debug Display any debugging information.
-h, --help Show this message.
Older versions
brew prune [--dry-run]:
Remove dead symlinks from the Homebrew prefix. This is generally not
needed, but can be useful when doing DIY installations. Also remove broken
app symlinks from /Applications and ~/Applications that were previously
created by brew linkapps.
If --dry-run or -n is passed, show what would be removed, but do not
actually remove anything.
rm /usr/local/Library/Taps/josegonzalez
-or if you are frightened-
mv /usr/local/Library/Taps/josegonzalez /usr/local/Library
Alike for other conflicting, but unlinked kegs/taps.
You can also use the provided info from the console and link them again:
Run `brew link`
Do this for each item listed, and everything should be fixed soon.

SHA1 error when using brew install

More specifically, I was using homebrew to install MySQL, and I got this error:
Error: SHA1 mismatch
Expected: f218ed64ce6e7a5d3670acdd6a18e5ed95421d1f
Got: 3a57f6f44186e0dba34ef8b8fb4a9047e9e5d8a3
Archive: /Users/rdp/Library/Caches/Homebrew/cmake-2.8.7.bottle.tar.gz
(To retry an incomplete download, remove the file above.)
Everything worked after I ran brew update.
Incase the brew update fails, try the following
cd `brew --prefix`
git remote add origin https://github.com/Homebrew/homebrew
git fetch origin
git reset --hard origin/master
I was having the same problem as Steve S regarding epstool dependency on Octave and found this link:
https://github.com/Homebrew/homebrew-science/issues/1110
Check out iml's post about 10 down from the top (his second post). As he explained, I downloaded it from the fedoraproject.org site and then moved it into the /Library/Caches/Homebrew/ directory.
Cheers,
-Maashu
In my case the file downloaded from https://downloads.sourceforge.net/ctags/ctags-5.8.tar.gz is actually a html file. I downloaded the real file and place it at /Library/Caches/Homebrew/ctags-5.8.tar.gz. Then I run brew install ctags, everything works.

Resources