flyctl version update issue

Error: latest version on homebrew is invalid: Get “https://api.fly.io/app/flyctl_validate/v0.2.28”: context deadline exceeded
please try again later

is what I get every time I try to run flyctl version update or flyctl version upgrade.

I’ve updated curl, I’ve updated all of my homebrew. Still the exact same message. Any ideas on how to fix this?

Hi @Luther! Could you try uninstalling and re-installing flyctl through Homebrew? brew uninstall flyctl / brew install flyctl

If that doesn’t work, you may need to uninstall the Homebrew flyctl and install through curl instead:
curl -L https://fly.io/install.sh | sh

That second solution fixed it. Thanks!

1 Like

Actually I noticed this solution brings a new issue, in that I can’t use this flyctl command via zsh, I have to use the full path from the curl instead. What can I do to once again be able to just type fly or flyctl in the terminal to use flyctl?

add export PATH="~/.fly/bin:$PATH" to the end of your ~/.zshrc file

I didn’t have a .zshrc file so I had to create it but now I get permission denied when I try to cd to it. I opened it and wrote export PATH="~/.fly/bin:$PATH" inside the file but nothing changed. Can you give me more explicit commands I could try?

Hi @Luther - a couple questions:

  1. Could you try restarting your terminal (if you haven’t already)? Afterwards, what’s the output when you enter fly or flyctl?

  2. Where did you create and save your .zshrc file, and what OS are you running?

  1. I’ve just restarted the terminal and I’m getting zsh: command not found: fly and zsh: command not found: flyctl.
  2. I created my .zshrc file at ~/.zshrc. I’m running macOS Monterey on a MacBook Pro (Retina, 15 inches, mid-2015).

In your .zshrc file, could you try removing the double quotes, so it just reads export PATH=~/.fly/bin:$PATH? Then try restarting the terminal again - does the same error still show?

Just did that, and now it’s working. Thanks.

Awesome, no problem - glad it’s working now!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.