flyctl auth login problems

What am I doing wrong?

flyctl auth login

Email: my@email.com
Password: ***************
One Time Password (if any): what should I put here?! If I leave it empty or put something I just get:

ERROR Post https://fly.io/api/v1/sessions: dial tcp: lookup fly.io on [::1]:53: dial udp [::1]:53: socket: permission denied

If I try to check version:
flyctl version
I get only:

flyctl

My system:

  • Ubuntu 22.04.1 LTS, 64bit

I registered my account with Github but I changed the password after that so I put correct login details.

any ideas?

Hi,

Not sure :thinking:

If you run which flyctl … what does that say? Only regardless of any auth issue, flyctl version should work. That’s the first thing to fix. And if it did, the auth would probably too.

Did you install it using their build script? Install flyctl · Fly Docs Maybe grab the latest version by doing that and see if that alone helps.

Thanks for answer.

When I run which flyctl I get
/snap/bin/flyctl

But flyctl version I get
only flyctl

Yes, I install it by their script as they wrote on docs.

It’s odd that the version of flyctl in your path is in the snap directory. We don’t publish a snap, though I found this which is WAY out of date.

Is flyctl in the list when you run snap list?

Yes,

flyctl      v0.0.7+git1.26c8554-dirty   1      latest/edge      michaeldwan   jailmode

I install it by curl -L https://fly.io/install.sh | sh

Presumably that would explain it then.

I don’t know how the install script is doing that - one for @michael ! - but in the meantime I’d think you could download the latest binary directly, from Releases · superfly/flyctl · GitHub

That should work. And that should fix your login issue too.

1 Like

Ah yes that’ll do it! Remove the snap’d version so the one installed into /usr via the script will get picked up.

I think snap remove flyctl would do this.

1 Like

Thanks guys @michael & @greg , it helps - I can log in to Fly by flyctl :slight_smile:

2 Likes