stackitcloud / stackit-cli

A command-line interface to manage STACKIT resources
https://www.stackit.de/en
Apache License 2.0
35 stars 7 forks source link

Feat: Retry other ports if 8000 is occupied for `stackit auth login` #80

Closed PeterStolz closed 6 months ago

PeterStolz commented 7 months ago

Hello, stackit auth login needs to open a webUI on localhost:8000. If this port is occupied it fails with:

Error: authorization failed: listen to port :8000: listen tcp :8000: bind: address already in use

I now had to disable my development resources disrupting my workflow. A retry loop trying different ports would be convenient. If you want that as a contribution let me know!

vicentepinto98 commented 7 months ago

Hey @PeterStolz, You are right, we should implement this, that's something that we already had considered but didn't get to do yet.

Your contribution would be most welcome!

gfelbing commented 6 months ago

+1 on this.

I tried implementing it on a random port. But the authentication doesn't work on other ports than 8000. This is configuration of the oauth client.