livebud / bud

The Full-Stack Web Framework for Go
MIT License
5.57k stars 180 forks source link

Error during cURL Installation (Mac) #348

Closed chriswalz closed 1 year ago

chriswalz commented 1 year ago

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 
matthewmueller commented 1 year ago

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?

chriswalz commented 1 year ago

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

matthewmueller commented 1 year ago

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: https://github.com/livebud/bud/blob/93a621e30dcf62885b2735b80444d255591c8dfd/install.sh#L241

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.

chriswalz commented 1 year ago

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
matthewmueller commented 1 year ago

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