Using winpty on Windows

191 Views Asked by At

I am trying to test Azure IoT hub and the first step is to generate certificates for testing. I am following the guide:

https://learn.microsoft.com/en-us/azure/iot-hub/tutorial-x509-test-certs?tabs=windows

I got stuck at Step 4 where it mentions the use of winpty:

winpty openssl req -new -config rootca.conf -out rootca.csr \
  -keyout private/rootca.key

When I try to execute the command, I am getting the following result:

C:\Users\test\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 search on Google I have found very little information. However, the most popular Google result is the following git repository for winpty: https://github.com/rprichard/winpty

Unfortunately, it does not have any installation steps on how to get this to work. I would appreciate if someone who had some issues with winpty on Windows could give some advice on how to get this working so I can proceed with my certificate generation. Thanks in advance!

1

There are 1 best solutions below

0
TheBestPlayer On

The issue can be solved by using Git Bash instead of Command Prompt. The winpty command is recognised in Git Bash.

Git bash:

$ winpty --version
winpty version 0.4.3
commit none

Command Prompt:

winpty --version
'winpty' is not recognized as an internal or external command,
operable program or batch file.