Comments (7)
Site note: We should probably add the remove/uninstall cmd for MacOS to the ReadMe: https://github.com/github/gh-cli#macos
from cli.
Great, thank you!!!
from cli.
@tierninho Hmm, it seems like the github/gh
Homebrew tap isn't auto-updating for you. The v6.6.6
release was an accident and we've reverted it last week. I rememeber you've had this trouble before, too: https://github.com/github/ce-cli/issues/10#issuecomment-539947533. Do you have any HOMEBREW_*
environment variables set?
This should work in any case:
brew uninstall -f gh
brew update # typically not needed, Homebrew automatically runs this in 5-min intervals
brew install github/gh/gh
Note that even if you de-authorized "GitHub CLI" in your GitHub Settings, its oauth token is still stored in ~/.config/gh
. CLI will attempt to use this (now invalid) token for API requests and fail. We don't yet handle this case, so you will have to manually remove ~/.config/gh
too in order to re-authenticate. I will make a note for CLI to handle this better in the future.
# force re-auth
rm -f ~/.config/gh
Agreed re: remove/uninstall instructions!
from cli.
Thanks @mislav but still blocked. I tried without brew update
but that ran into the download error above. With brew update
is here:
➜ desktop git:(development) brew uninstall -f gh
➜ desktop git:(development) brew update
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Error: Fetching /usr/local/Homebrew/Library/Taps/github/homebrew-gh failed!
➜ desktop git:(development) ~/.gitconfig
zsh: permission denied: /Users/tierninho/.gitconfig
➜ desktop git:(development)
Let me know if you need to see output of brew doctor
or brew config
.
Do you have any HOMEBREW_* environment variables set?
I do not think so.
from cli.
It looks like Homebrew couldn't update the github/homebrew-gh
tap due to not being able to fetch over SSH.
Do you normally use SSH git URLs with GitHub? If not, you can switch to HTTPS:
git --git-dir=/usr/local/Homebrew/Library/Taps/github/homebrew-gh/.git remote set-url https://github.com/github/homebrew-gh.git
HTTPS should have been the default; I'm not sure how it ended up being an SSH url for you.
from cli.
I swapped over to HTTPS, ran the cmd above and tried again but got the same result.
➜ desktop git:(development) brew install github/gh/gh
==> Installing gh from github/gh
==> Downloading https://github.com/github/homebrew-gh/releases/download/v6.6.6/gh_6.6.6_macOS_amd64.tar.gz
#=#=-# #
curl: (22) The requested URL returned error: 404 Not Found
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "gh"
Download failed: https://github.com/github/homebrew-gh/releases/download/v6.6.6/gh_6.6.6_macOS_amd64.tar.gz
While brew update
gave me:
➜ gh-cli git:(master) ✗ brew update
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Error: Fetching /usr/local/Homebrew/Library/Taps/github/homebrew-gh failed!
This was the output of the HTTPS cmd, not sure it worked based on:
➜ gh-cli git:(master) ✗ git --git-dir=/usr/local/Homebrew/Library/Taps/github/homebrew-gh/.git remote set-url https://github.com/github/homebrew-gh.git
usage: git remote set-url [--push] <name> <newurl> [<oldurl>]
or: git remote set-url --add <name> <newurl>
or: git remote set-url --delete <name> <url>
--push manipulate push URLs
--add add URL
--delete delete URLs
from cli.
Ah sorry, I wrote you the wrong command to swap the remote url. This should do it:
git --git-dir=/usr/local/Homebrew/Library/Taps/github/homebrew-gh/.git remote set-url origin https://github.com/github/homebrew-gh.git
from cli.
Related Issues (20)
- `gh pr merge`: default to git user.email for merge commit HOT 1
- Reprehensibly insecure installation instructions HOT 2
- 'gh copilot' command exec failed HOT 2
- gh label list is limited to 30 labels HOT 4
- Support creating (multiple) issues from CSV file. HOT 2
- Show browser login URL HOT 1
- Improve the help text for `gh project item-edit`
- Improve the error message when commands aren't run in a git repo, and `-R` hasn't been provided HOT 1
- Rendered Markdown table ignores justify HOT 4
- Adding support for ppc64le. HOT 5
- Add support for search releases between two dates HOT 4
- `pr create`: Incorrect `must be on a branch named differently than` error message when missing commits
- `-F` doesn't parse JSON object inside an array HOT 1
- Unable to Connect to GitHub Codespace using Token with Non-interactive Method
- failed to authenticate via web browser HOT 10
- gh run view --json doesn't expose artifacts
- Support checkout closed PR or PR branch
- Provides progress during extension installation
- gh variable set is failing when trying to update a repository variable HOT 7
- Copilot CLI not working after installing with gh extension install HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.