"fly login" fails when trying to retrieve bearer token with a long bearer token in Concourse 6.3.1
search cancel

"fly login" fails when trying to retrieve bearer token with a long bearer token in Concourse 6.3.1

book

Article ID: 297217

calendar_today

Updated On:

Products

Concourse for VMware Tanzu

Issue/Introduction

When trying to retrieve the bearer token from a browser with Concourse 6.3.1, it gives a longer token than usual and "fly login" fails with a long token as illustrated below:
$ fly -t prod:default login -k
logging in to team 'prod:default'

navigate to the following URL in your browser:

  https://concourse-apps.example.com/login?fly_port=44366

or enter token manually: bearer <a very long token returned in browser>

could not find a valid token.
logging in to team 'prod:default'


Resolution

This issue occurs because the fly CLI does not handle the long token properly. For more information, refer to fly: allow pasting long tokens into login #5770. This issue is resolved in Concourse 6.4.0+.

Note: Avoid upgrading only the fly CLI to v6.4.0, it will be incompatible with the Concourse system that is still on the old version.

In addition, if the login user is a member of many teams, the returned token could be very long. To work around this issue, remove the login user from some teams to reduce the token length.