Skip to content

Conversation

hirotaka
Copy link

@hirotaka hirotaka commented Oct 6, 2025

What's the problem?

When following the README instructions and running brew tap tobi/try, I got this error:

$ brew tap tobi/try
Error: Failure while executing; git clone https://github.com/tobi/homebrew-try /opt/homebrew/Library/Taps/tobi/homebrew-try --origin=origin --template= --config core.fsmonitor=false exited with 128.

This happens because there's no homebrew-try repository. The repo is named try, which doesn't follow Homebrew's naming convention (homebrew-*).

Then I tried brew install try directly instead, I got a SHA256 mismatch error:

$ brew install try
==> Fetching downloads for: try
==> Fetching dependencies for tobi/try/try: openssl@3 and ruby
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.6.0
################################################################################################################################################################################## 100.0%
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:9a8fa2ae1ef3424b116d7e6422d979e0290f4affdef072b1592e4535d2617d92
################################################################################################################################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ruby/manifests/3.4.6
################################################################################################################################################################################## 100.0%
==> Fetching ruby
==> Downloading https://ghcr.io/v2/homebrew/core/ruby/blobs/sha256:8db26d72de0d97182fa05e1cc48f2e86ab03c040831f2087705fc94eb0d067a0
################################################################################################################################################################################## 100.0%
==> Fetching tobi/try/try
==> Downloading https://github.com/tobi/try/archive/refs/heads/main.tar.gz
==> Downloading from https://codeload.github.com/tobi/try/tar.gz/refs/heads/main
#=#=-  #      #
Error: try: SHA-256 mismatch
Expected: dd3753f38b5c35597c8c2528a19efd7e4289bbbe977d18e2e299a2a57b393a8e
  Actual: 151778fdd07adac23fb021d2d84bd0756e0d626a97498503da24413bfdd72c28
    File: /Users/hirotaka/Library/Caches/Homebrew/downloads/7fef3f3e550762c030552960944b4df9886ae8802c0860c1459dcf5b45ed904a--try-main.tar.gz
To retry an incomplete download, remove the file above.

This is because the formula uses an archive URL for the main branch (archive/refs/heads/main.tar.gz), so the hash changes every time main is updated.

How this fixes it

  1. Formula/try.rb: Switch to using head

    • Removed url and sha256 (these were causing the mismatch)
    • Removed version "main" (invalid version string)
    • Added head to reference the main branch directly
  2. README.md: Updated with correct installation instructions

    • Fixed to use two-argument brew tap command (explains why full URL is needed)

How to install now

brew tap tobi/try https://github.com/tobi/try
brew install try

I hope it should work now!

- Switch from main branch archive to HEAD to avoid SHA256 mismatches
- Update README with correct two-argument tap command
- Remove invalid version string
- Add note explaining repository naming
@hirotaka hirotaka force-pushed the fix-homebrew-formula branch from cbd1cd0 to 2cdf849 Compare October 6, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant