How to login manually in Concourse 4?


#1

I am running the Concourse CI CLI Fly in a Docker container and want to be able to login without the need of a browser.

In concourse 3.x I was able to login manually using the instructions below:

1.) Login into the server:

fly --target cloud login --team-name main --concourse-url http://concourse.ecg-test.com:8080/

2.) Copy link:

http://example.com:8080/auth/github?team_name=main&fly_local_port=39145

3.) Remove fly_local_port to manually issue a token:

http://example.com:8080/auth/github?team_name=main

4.) Copy and paste complete output into CLI terminal and press enter.

However, I am not able to do this in Concourse CI 4 any more. Does anybody know how to login manually without a browser in Concourse CI 4.x?


#2

In Concourse CI v4.22 I get the following link:

  • https://example.com:8080/sky/login?redirect_uri=http://127.0.0.1:43283/auth/callback

My problem is I am unable to modify the URL as I previously did.
This is what I see in the terminal:

navigate to the following URL in your browser:

  https://example.com:8080/sky/login?redirect_uri=http://127.0.0.1:43283/auth/callback

or enter token manually: 

How can I enter token manually?


#3

Try this:

fly --target cloud login --team-name main --concourse-url http://concourse.ecg-test.com:8080/ -u your_username -p your_password

#4

Thanks, I assume your approach works if you have LocalAuth enabled.

I would like to use GitHub as authentication/authorization provider. As I described it worked in Concourse v3 by removing the fly_local_port parameter from the URL, but the same approach does not work with Concourse v4.


#5

The issue I am having is the redirect URI at the end of the login url: https://example.com/sky/login?redirect_uri=http://127.0.0.1:40605/auth/callback

If I could set the IP address to 0.0.0.0 and the give a fixed port number of 8002 and generate a login URL like this http://0.0.0.0:8002/auth/callback I should be able to login from within a container.