问题
I have Windows 10. I can't enable Hyper V, so I'm using Docker Toolbox. My terminal of choice is git bash, which is a Msys2 terminal. Normally, everything works fine, except when I need an interactive terminal. For instance,
docker login artifactory.mycompany.com
gives:
Error: Cannot perform an interactive login from a non TTY device
When I try instead
winpty docker login artifactory.mycompany.com
nothing happens, but my console input and output is completely consumed (nothing is displayed when I type). The only way I can get out of it is by typing exit
or restarting git bash
, which is obviously not useful.
How do I get winpty to work correctly with git bash? Or is there another way to use interactive docker commands within git bash?
来源:https://stackoverflow.com/questions/49763662/winpty-consumes-git-bash-shell