This is designed behavior if the local fly CLI version is very new (e.g. v6.x) while the target Concourse server version is old (e.g. v5.x).
Starting from fly CLI version 6.0, it's possible to run "
fly sync" without logging into the Concourse server first.
$ fly -t tg1 logout
logged out of target: tg1
$ ./fly -v
6.5.1
$ ./fly sync -c http://concourse.example.com:80
downloading fly from http://concourse.example.com:80...
fly v5.5.8 [================================================] 19.0MiB/19.0MiB
done
$ ./fly -v
5.5.8