https://infracost.io logo
#help
Title
# help
a

ambitious-spring-76637

06/07/2023, 5:10 PM
Hi Team, when running infracost auth login command after installing terracost. I am getting the below error.
b

busy-agent-35515

06/07/2023, 5:13 PM
Hello! Could you please check that your command is still running while you're logging in in browser? This error says that the CLI is expected to be running to accept the redirect from the browser It should show something like
Copy code
We're redirecting you to our log in page, please complete that,
and return here to continue using Infracost.

If the redirect doesn't work, use this URL:

<https://dashboard.infracost.io/login>...

Waiting...
a

ambitious-spring-76637

06/07/2023, 5:15 PM
image.png
yes it is still waiting..what i need to do for that
b

busy-agent-35515

06/07/2023, 5:16 PM
Usually nothing, after logging in to Infracost Cloud the browser redirects to localhost and CLI accepts the data
a

ambitious-spring-76637

06/07/2023, 5:17 PM
how much time will it take to redirect..
b

busy-agent-35515

06/07/2023, 5:17 PM
Instant
a

ambitious-spring-76637

06/07/2023, 5:17 PM
i waited for 10 mins
b

busy-agent-35515

06/07/2023, 5:18 PM
Could you please verify that the port 40751 matches in the redirect url
<http://localhost:40751>
b

busy-agent-35515

06/07/2023, 5:18 PM
Okay, now it's 34215
a

ambitious-spring-76637

06/07/2023, 5:19 PM
it is not redirecting to any thing, it is in waiting stage
b

busy-agent-35515

06/07/2023, 5:19 PM
Oh, wait, are you running this command in a container somewhere?
a

ambitious-spring-76637

06/07/2023, 5:19 PM
in linux server
b

busy-agent-35515

06/07/2023, 5:19 PM
This command should be running on your local machine
a

ambitious-spring-76637

06/07/2023, 5:19 PM
in local machine where?
b

busy-agent-35515

06/07/2023, 5:20 PM
Where your browser is running 🙂
a

ambitious-spring-76637

06/07/2023, 5:21 PM
can i call you for a moment
b

busy-agent-35515

06/07/2023, 5:21 PM
The idea is that the browser redirects back to localhost where the CLI is running and waiting for that redirect request. If you're running the command on one machine, but the browser is on another, this won't work
Sure thing, I'll dm you the zoom link
a

ambitious-spring-76637

06/07/2023, 5:22 PM
okay
c

crooked-daybreak-55253

06/07/2023, 5:23 PM
As an alternative to
infracost auth login
you can log in to the infracost dashboard yourself, copy the api key from the
Org Settings
page and use the configure command to set up the CLI:
Copy code
infracost configure set api_key MY_API_KEY
b

busy-agent-35515

06/07/2023, 5:41 PM
Yep, we did this on the cloud server 👍
a

ambitious-spring-76637

06/07/2023, 6:09 PM
Thanks Vadim and Tim..Thanks alot
2 Views