bevry / dorothy

🧙🏻‍♀️ Bring your dotfile commands and configuration to any shell. Sensible defaults and hundreds of commands preloaded. Supports Bash, Zsh, Fish, Nu, Xonsh, Elvish, Dash, KornShell, macOS, Linux, Windows.
Other
277 stars 21 forks source link

Trouble installing dorothy on Ubuntu 22.04.3 LTS #219

Closed edmcman closed 2 months ago

edmcman commented 2 months ago

I'm having trouble installing dorothy on a Linux machine. It seems to be a problem reading the github rate_limit API, but when I run curl manually, it seems to work fine. Any idea what is going on or how to debug further?

ed@banana:~$ bash -ic "$(curl -fsSL https://dorothy.bevry.me/install)"
Installing Dorothy into /home/ed/.local/share/dorothy
Cloning into '/home/ed/.local/share/dorothy'...
remote: Enumerating objects: 23213, done.
remote: Counting objects: 100% (2244/2244), done.
remote: Compressing objects: 100% (378/378), done.
remote: Total 23213 (delta 1974), reused 2056 (delta 1864), pack-reused 20969
Receiving objects: 100% (23213/23213), 6.29 MiB | 1.33 MiB/s, done.
Resolving deltas: 100% (17591/17591), done.

┌  Install Dorothy  ┐
┌  Ensure required dependencies  ┐
curl: (22) The requested URL returned error: 401
Failed to fetch the URL: https://api.github.com/rate_limit

ERROR:
Failed to fetch the GitHub API Rate Limit. Authorize with the GitHub CLI: gh auth login

ERROR:
No release assets were found for repository greymd/teip

ERROR:
No download assets were found for repository greymd/teip
curl: (22) The requested URL returned error: 401
Failed to fetch the URL: https://api.github.com/rate_limit

ERROR:
Failed to fetch the GitHub API Rate Limit. Authorize with the GitHub CLI: gh auth login

ERROR:
No release assets were found for repository greymd/teip

ERROR:
No download assets were found for repository greymd/teip
curl: (22) The requested URL returned error: 401
Failed to fetch the URL: https://api.github.com/rate_limit

ERROR:
Failed to fetch the GitHub API Rate Limit. Authorize with the GitHub CLI: gh auth login

ERROR:
No release assets were found for repository greymd/teip

ERROR:
No download assets were found for repository greymd/teip
└  Ensure required dependencies  ┘
Strongbox repository detected.
curl: (22) The requested URL returned error: 401
Failed to fetch the URL: https://api.github.com/rate_limit

ERROR:
Failed to fetch the GitHub API Rate Limit. Authorize with the GitHub CLI: gh auth login

ERROR:
No release assets were found for repository uw-labs/strongbox

ERROR:
No download assets were found for repository uw-labs/strongbox
The [strongbox] utility is already installed. ✅
strongbox: 2024/04/22 10:59:17 strongbox.go:208: git global configuration updated successfully
Cloning into '/home/ed/.local/share/dorothy/user'...
remote: Enumerating objects: 37, done.
remote: Counting objects: 100% (37/37), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 37 (delta 10), reused 35 (delta 8), pack-reused 0
Receiving objects: 100% (37/37), 5.72 KiB | 5.72 MiB/s, done.
Resolving deltas: 100% (10/10), done.
https://github.com/edmcman/dotfiles.git successfully cloned to /home/ed/.local/share/dorothy/user
renamed '/home/ed/.local/share/dorothy/user' -> '/home/ed/.config/dorothy'
curl: (22) The requested URL returned error: 401
Failed to fetch the URL: https://api.github.com/rate_limit

ERROR:
Failed to fetch the GitHub API Rate Limit. Authorize with the GitHub CLI: gh auth login

ERROR:
No release assets were found for repository greymd/teip

ERROR:
No download assets were found for repository greymd/teip
curl: (22) The requested URL returned error: 401
Failed to fetch the URL: https://api.github.com/rate_limit

ERROR:
Failed to fetch the GitHub API Rate Limit. Authorize with the GitHub CLI: gh auth login

ERROR:
No release assets were found for repository greymd/teip

ERROR:
No download assets were found for repository greymd/teip
curl: (22) The requested URL returned error: 401
Failed to fetch the URL: https://api.github.com/rate_limit

ERROR:
Failed to fetch the GitHub API Rate Limit. Authorize with the GitHub CLI: gh auth login

ERROR:
No release assets were found for repository greymd/teip

ERROR:
No download assets were found for repository greymd/teip
/home/ed/.local/share/dorothy/commands/config-helper: line 367: teip: command not found
ed@banana:~$ curl https://api.github.com/rate_limit
{
  "resources": {
    "core": {
      "limit": 60,
      "remaining": 57,
      "reset": 1713801319,
      "used": 3,
      "resource": "core"
    },
    "graphql": {
      "limit": 0,
      "remaining": 0,
      "reset": 1713801585,
      "used": 0,
      "resource": "graphql"
    },
    "integration_manifest": {
      "limit": 5000,
      "remaining": 5000,
      "reset": 1713801585,
      "used": 0,
      "resource": "integration_manifest"
    },
    "search": {
      "limit": 10,
      "remaining": 10,
      "reset": 1713798045,
      "used": 0,
      "resource": "search"
    }
  },
  "rate": {
    "limit": 60,
    "remaining": 57,
    "reset": 1713801319,
    "used": 3,
    "resource": "core"
  }
}
balupton commented 2 months ago

Hrmmm. I'll look into it tomorrow. Thanks for reporting!

balupton commented 2 months ago

If you wish to debug further, the issue is either in: https://github.com/bevry/dorothy/blob/master/commands/get-github-release or https://github.com/bevry/dorothy/blob/master/commands/fetch

you can do set -x inside either of them to get more info on what was executing to cause the failure

balupton commented 2 months ago

Found the issue. Give me 30 mins or so

balupton commented 2 months ago

I'm hoping https://github.com/bevry/dorothy/commit/6ab04b20db7d4ddee6c7d261a42bbfd2d79a1f0a will fix it. If you:

cd /home/ed/.local/share/dorothy
git pull origin master

then try again, should hopefully work, I'll have more time to look into anything more tomorrow

edmcman commented 2 months ago

That did indeed fix the git problems, thanks! Running into another problem now (no dorothy commands are visible), but let me see if I can figure that one out.