livebud / bud

The Full-Stack Web Framework for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error during cURL Installation (Mac)

chriswalz opened this issue · comments

OS: MacOS

$ curl -sf https://raw.githubusercontent.com/livebud/bud/main/install.sh | sh

livebud/bud: checking GitHub for latest version
curl: (22) The requested URL returned error: 401 

Hey @chriswalz, I'm seeing:

$ curl -sf https://raw.githubusercontent.com/livebud/bud/main/install.sh | sh
livebud/bud: checking GitHub for latest version
livebud/bud: found version 0.2.5 for darwin/arm64
livebud/bud: downloading https://github.com/livebud/bud/releases/download/v0.2.5/bud_v0.2.5_darwin_arm64.tar.gz
livebud/bud: verifying checksums
livebud/bud: installed as /usr/local/bin/bud

Do you mind trying again?

Hi Matthew. I appreciate you taking the time to look into this. Still doesn't work on my end but can look into whether it's my firewall or something

Just dug in a bit further. Since it's a 401, it seems like an unauthorized request.

I could see that happening if a GITHUB_TOKEN is set and maybe it's expired or not allowed to access repos:

bud/install.sh

Line 241 in 93a621e

test -z "$GITHUB_TOKEN" || header="Authorization: token $GITHUB_TOKEN"

Do you happen to have a GITHUB_TOKEN set in your environment? I thinkkk I can remove this line since it's a public repo, but I'd like to confirm that's the problem first.

You're right that was the problem! I removed that line and it fixed the issue.

$ sh install-bud.sh  

livebud/bud: checking GitHub for latest version
livebud/bud: found version 0.2.5 for darwin/amd64
livebud/bud: downloading https://github.com/livebud/bud/releases/download/v0.2.5/bud_v0.2.5_darwin_amd64.tar.gz
livebud/bud: verifying checksums
livebud/bud: installed as /usr/local/bin/bud
$ bud

  Usage:
    bud [flags] [command]

  Flags:
    -C, --chdir  change the working directory
    -h, --help   show this help message
    -L, --log    filter logs with this pattern

  Commands:
    build    build your app into a single binary
    create   create a new app
    new      scaffold code for your app
    run      run the dev server
    tool     extra tools
    version  show the current version

Awesome, thanks for reporting this! Fixed in main. Let me know if you run into anything else or have any feature requests!