Closed dscho closed 3 years ago
I think I found the reason: https://github.com/Jarred-Sumner/git-peek/blob/885e324360f00ff030f44fcd99f4ea29f98b459b/src/Search.tsx#L42
Once upon a time, long, long ago, I had hub
installed (which, as far as I understand at least, has been replaced by GitHub CLI), and it had a stale PAT in ~/.config/hub
. Apparently that was used.
🤔 maybe using hubs automatically is too “smart”. I guess I can have a config file it can load. But I’m wary of introducing more complexity.
I wonder if there’s a way I could use ~/.gitconfig? Or maybe, just have a ~./.git-peek.env file which just comes preloaded with each CLI argument as environment variables. Then, each flag is both globally configurable and per-run configurable. And setting environment variables is kind of familiar? It will have all of them listed in the file so it will be somewhat self documenting
Also, to clarify — the reason for credentials was because I kept getting rate limited in my own usage because the search is very aggressive about sending requests to their api due to short debounce time. Also for private repos. But it kind of backfires if it means copying doesn’t work
In my mind, having support for the environment variable GITHUB_TOKEN
is plenty enough, no need to look at (and use) hub
's token.
You're right.
Added in 1.1.30 - https://github.com/Jarred-Sumner/git-peek/releases/tag/1.1.30
I just tried this at home, and it failed:
Why does it need credentials to begin with?