rprichard / winpty

A Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs.
MIT License
1.29k stars 167 forks source link

How to install winpty on Windows #204

Open krupis opened 8 months ago

krupis commented 8 months ago

Hello. I want to test Azure IoT hub and I am currently following instructions on how to create certificates for testing: https://learn.microsoft.com/en-us/azure/iot-hub/tutorial-x509-test-certs?tabs=windows

Step 4 in the instruction mentions using winpty: image

I am getting the following error:

C:\Users\petrikas.lu\Desktop\WORK\raktai\rootca> winpty openssl req -new -config rootca.conf -out rootca.csr \
'winpty' is not recognized as an internal or external command,
operable program or batch file.

After some quick google search, I didint manage to find clear instructions on how to get this running on Windows machine so I can execute the required command. I have found this repository as a first search on google but I do not see Installation instructions anywhere. Apologies for silly question!

Thanks in advance for any help.

k-takata commented 8 months ago

winpty should be automatically installed when you install Git for Windows (Git Bash). So, if you already use it, you should be able to run the command as is.

krupis commented 8 months ago

@k-takata I have Git for Windows but winpty does not seem to be working.

C:\Users\petrikas.lu\Desktop\WORK\raktai\rootca>git --version
git version 2.43.0.windows.1
krupis commented 8 months ago

I figured it out! If you try to use this command from Git bash, it will work.. I have initially tried to use this command via regular Command Prompt.

Is that expected behaviour?

k-takata commented 8 months ago

Yes. winpty is not needed when you run a command via Command Prompt.