Superuser creation skipped due to not running in a TTY

I’ve deployed a number of Django apps previously and haven’t had this issue. But I’m getting it repeatedly now across several different projects.

After deploying a project and then migrating the database fly ssh console -C "python /code/ migrate" I run fly ssh console -C "python /code/ createsuperuser". This has worked the last few months with otherwise identical projects.

But I now get Superuser creation skipped due to not running in a TTY. You can run createsuperuser in your project to create one manually. Whether it’s on my projects or even @katia’s recent one.

Are others getting the same error? I’m unclear what exactly has changed.

Hey @wsvincent, if you add the --pty flag to fly ssh console it should work like before.

A few weeks ago we adjusted fly ssh console to work more in line with OpenSSH and not allocate a pseudoterminal by default when a command is given (-C), since it was tripping up some users who were trying to pipe data in or out of fly ssh console -C ... (like they might with regular old ssh). I authored this change, and unfortunately it was more disruptive than I expected. My apologies for this!

EDIT: createsuperuser requires a pseudoterminal because it prompts for a password. I believe that migration should work fine without one, though.

1 Like

Thanks @MatthewIngwersen for the quick response. Confirmed that fly ssh console --pty -C "python /code/ createsuperuser" works.

Is there a changelog I can subscribe to, to find out about breaking changes like this. (or can you stop making breaking changes)

This broke some automated scripts and interactive consoles for my Rails app too - I’ve spent mucho time trying to figure out what I’ve broken in my app, or what gem I upgraded that broke this.

1 Like