September 8th, 2024

PSA: Eget That Executable from GitHub

The blog post discusses the challenges of downloading binaries from GitHub and introduces "eget," a command-line tool that simplifies this process while addressing security and API limitations.

Read original articleLink Icon
PSA: Eget That Executable from GitHub

The blog post discusses the challenges of downloading and installing binaries from GitHub, particularly when setting up a development container. The author highlights the cumbersome process of manually finding the latest releases, identifying the correct binaries, and handling various packaging formats. To streamline this process, the author introduces "eget," a command-line tool that simplifies downloading the latest releases from GitHub repositories with a single command. While eget is not included in any distribution and requires a specific installation method, it significantly reduces the complexity of managing binaries across different platforms. The tool also offers interactive prompts for ambiguous binaries and supports SHA256 checksums for safer automation. However, the author notes limitations with GitHub's API, which can hinder the tool's functionality due to call limits. Despite these challenges, the author advocates for using GitHub and finds eget to be a valuable tool for software acquisition across various systems.

- Eget simplifies the process of downloading and installing binaries from GitHub.

- The tool requires a specific installation method and is not included in standard distributions.

- Eget supports SHA256 checksums for enhanced security in automation.

- Limitations exist with GitHub's API, affecting the tool's ability to fetch release information.

- The author prefers GitHub for software projects despite its challenges.

Link Icon 9 comments
By @captn3m0 - 5 months
Figuring out the “latest” release can happen via the 302 redirect that GitHub offers on releases/latest/ - no API needed. It also works directly for artifact URLs.
By @__MatrixMan__ - 5 months
Glad to see that there's a `--verify-sha256=` flag.

I prefer hard-coded hashes in my code so that when the file changes, I'm made aware. I've lost so much time chasing bugs back to a dependency which changed without a version bump and whose hash was checked by a script that just got the hash it was checking at runtime.

By @duckkg5 - 5 months
This seems to be inspired by the smelly nerds meme

https://www.reddit.com/r/github/comments/1at9br4/i_am_new_to...

By @sneak - 5 months
This is effectively giving Microsoft RCE on your computer.

We trust github.com and small-time publishers far too much. There’s a reason Debian packages software and runs mirrors.

By @bitbasher - 5 months
I like the idea, but I can't imagine using it for a few reasons.

1. There's a catch-22. In order to fetch binaries you need to first install eget.

2. You need to trust eget to not be (or become) malicious.

Perhaps #1 can be resolved by providing it as a proxy service and not an executable. For example, "wget eget.net/gopls@latest" which then usings eget on the server to grab/cache the binary and send it back.

Then again, that would mean putting even more trust in eget.

By @athorax - 5 months
Not exactly the same, but aqua is a similar tool in this space https://github.com/aquaproj/aqua
By @alt187 - 5 months
> However, I’m firmly on the side of using GitHub for everything because projects that use alternatives to GitHub are special snowflakes that make everything harder for me as a user.

Good.

By @oalders - 5 months
https://github.com/houseabsolute/ubi does a nice job of fetching binaries from GitHub. Just give it a repo and a location to place the binary.

ubi --project oalders/is --in ~/local/bin

By @kayson - 5 months
Similarly, there's Obtainium for Android. I love it for open source apps.

https://github.com/ImranR98/Obtainium