Windows 10: Help getting HTTPS to work in Command Line in Windows 10 (please note that HTTP is working)

Discus and support Help getting HTTPS to work in Command Line in Windows 10 (please note that HTTP is working) in Windows 10 Network and Sharing to solve the problem; Hi there, I have been searching on the net for a couple of hours already and haven't found a solution. I've even tried disabling the Windows... Discussion in 'Windows 10 Network and Sharing' started by AcidSlide, Oct 18, 2019.

  1. AcidSlide Win User

    Help getting HTTPS to work in Command Line in Windows 10 (please note that HTTP is working)


    Hi there,


    I have been searching on the net for a couple of hours already and haven't found a solution. I've even tried disabling the Windows Firewall and Windows Defender to see if it is blocking the outgoing HTTPS requests from the command line.


    I have Node/Npm installed in my Win10 machine and I was trying to install some node modules, but I keep on getting ECONNRESET error. I also have a curl.exe in my System32 folder which is also not working for any HTTPS links I've tried.


    >curl.exe --version

    curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL

    Release-Date: [unreleased]

    Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp

    Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL



    >node --version

    v10.16.3


    >npm --version

    6.12.0

    (NOTE: NPM version was originally 6.3.x, details later)


    When I try the following, I get handshake errors:

    >curl.exe -vvv https://www.google.com

    * Rebuilt URL to: https://www.google.com/

    * Trying 172.217.25.4...

    * TCP_NODELAY set

    * Connected to www.google.com (172.217.25.4) port 443 (#0)

    * schannel: SSL/TLS connection with www.google.com port 443 (step 1/3)

    * schannel: checking server certificate revocation

    * schannel: sending initial handshake data: sending 179 bytes...

    * schannel: sent initial handshake data: sent 179 bytes

    * schannel: SSL/TLS connection with www.google.com port 443 (step 2/3)

    * schannel: failed to receive handshake, need more data

    * schannel: SSL/TLS connection with www.google.com port 443 (step 2/3)

    * schannel: encrypted data got 2536

    * schannel: encrypted data buffer: offset 2536 length 4096

    * schannel: sending next handshake data: sending 93 bytes...

    * schannel: SSL/TLS connection with www.google.com port 443 (step 2/3)

    * schannel: failed to receive handshake, SSL/TLS connection failed

    * Closing connection 0

    * schannel: shutting down SSL/TLS connection with www.google.com port 443

    * schannel: clear security context handle

    curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed



    >curl.exe -vvv https://registry.npmjs.org

    * Rebuilt URL to: https://registry.npmjs.org/

    * Trying 104.16.27.35...

    * TCP_NODELAY set

    * Connected to registry.npmjs.org (104.16.27.35) port 443 (#0)

    * schannel: SSL/TLS connection with registry.npmjs.org port 443 (step 1/3)

    * schannel: checking server certificate revocation

    * schannel: sending initial handshake data: sending 183 bytes...

    * schannel: sent initial handshake data: sent 183 bytes

    * schannel: SSL/TLS connection with registry.npmjs.org port 443 (step 2/3)

    * schannel: failed to receive handshake, need more data

    * schannel: SSL/TLS connection with registry.npmjs.org port 443 (step 2/3)

    * schannel: encrypted data got 3706

    * schannel: encrypted data buffer: offset 3706 length 4096

    * schannel: sending next handshake data: sending 93 bytes...

    * schannel: SSL/TLS connection with registry.npmjs.org port 443 (step 2/3)

    * schannel: failed to receive handshake, SSL/TLS connection failed

    * Closing connection 0

    * schannel: shutting down SSL/TLS connection with registry.npmjs.org port 443

    * schannel: clear security context handle

    curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed





    But changing HTTPS to HTTP works...


    >curl.exe -vvv http://www.google.com

    * Rebuilt URL to: http://www.google.com/

    * Trying 172.217.24.68...

    * TCP_NODELAY set

    * Connected to www.google.com (172.217.24.68) port 80 (#0)

    > GET / HTTP/1.1

    > Host: www.google.com

    > User-Agent: curl/7.55.1

    > Accept: */*

    >

    < HTTP/1.1 200 OK

    < Date: Sat, 19 Oct 2019 01:20:34 GMT

    < Expires: -1

    < Cache-Control: private, max-age=0

    < Content-Type: text/html; charset=ISO-8859-1

    < P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info."

    < Server: gws

    < X-XSS-Protection: 0

    < X-Frame-Options: SAMEORIGIN

    < Set-Cookie: 1P_JAR=2019-10-19-01; expires=Mon, 18-Nov-2019 01:20:34 GMT; path=/; domain=.google.com; SameSite=none

    < Set-Cookie: NID=189=PxPsuD1n4LsfC77Baaf3PAPMp50XQ3bUIpUFoM8ydmSPTioeM7aMlArlMJz_OhXwuU4cfwd5ybtYMBYO7Y7Ayvhxm9tbCKDNallkAoLUGLkvayCd0u3SEMBv2aJ3m-BorrQGi5YOrIwBmLNaS-KlY8EIpvLeOwMjOsEcPPqduTY; expires=Sun, 19-Apr-2020 01:20:34 GMT; path=/; domain=.google.com; HttpOnly

    < Accept-Ranges: none

    < Vary: Accept-Encoding

    < Transfer-Encoding: chunked

    <

    <!doctype html><html itemscope="" itemtype="http://schema.org/WebPage"

    [RESPOSNE WAS TOO LONG TO INCLUDE IN POST, NO SENSE IN PASTING THE WHOLE THING]



    >curl.exe -vvv http://registry.npmjs.org

    * Rebuilt URL to: http://registry.npmjs.org/

    * Trying 104.16.16.35...

    * TCP_NODELAY set

    * Connected to registry.npmjs.org (104.16.16.35) port 80 (#0)

    > GET / HTTP/1.1

    > Host: registry.npmjs.org

    > User-Agent: curl/7.55.1

    > Accept: */*

    >

    < HTTP/1.1 200 OK

    < Date: Sat, 19 Oct 2019 01:21:30 GMT

    < Content-Type: application/json

    < Transfer-Encoding: chunked

    < Connection: keep-alive

    < Set-Cookie: __cfduid=d983a8f1b249904e9da683121a42717f21571448090; expires=Sun, 18-Oct-20 01:21:30 GMT; path=/; domain=.npmjs.org; HttpOnly

    < CF-Cache-Status: DYNAMIC

    < Cache-Control: must-revalidate

    < CF-Ray: 527eef83eec56076-MNL

    < Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"

    < Server: cloudflare

    <

    {"db_name":"registry","doc_count":1423204,"doc_del_count":340,"update_seq":13888173,"purge_seq":0,"compact_running":false,"disk_size":27631710439,"other":{"data_size":62800564597},"data_size":27006746374,"sizes":{"file":27631710439,"active":27006746374,"external":62800564597},"instance_start_time":"1569513360816858"****st registry.npmjs.org left intact



    So as you can see, HTTPS is giving errors, but not HTTP. I don't have any proxy configured, I don't have limitations in my network, and I even tried disabling Windows Firewall and Windows Defender. I have an Ubuntu WSL, an Ubuntu VM (via vmware), and there is no problem with HTTPS in them.


    To test this, I change the npm registry from https://registry.npmjs.org/ to http://registry.npmjs.org/


    WITH NPM REGISTRY SET TO HTTPS

    >npm install --global --production npm-windows-upgrade --verbose

    npm info it worked if it ends with ok

    npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe',

    npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',

    npm verb cli 'install',

    npm verb cli '--global',

    npm verb cli '--production',

    npm verb cli 'npm-windows-upgrade',

    npm verb cli '--verbose' ]

    npm info using npm@6.12.0

    npm info using node@v10.16.3

    npm verb npm-session 8f54e2561f964acb

    npm timing stage:rollbackFailedOptional Completed in 0ms

    npm timing stage:runTopLevelLifecycles Completed in 115092ms

    npm verb type system

    npm verb stack FetchError: request to https://registry.npmjs.org/npm-windows-upgrade failed, reason: Client network socket disconnected before secure TLS connection was established

    npm verb stack at ClientRequest.req.on.err (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)

    npm verb stack at ClientRequest.emit (events.js:198:13)

    npm verb stack at TLSSocket.socketErrorListener (_http_client.js:392:9)

    npm verb stack at TLSSocket.emit (events.js:198:13)

    npm verb stack at emitErrorNT (internal/streams/destroy.js:91:8)

    npm verb stack at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)

    npm verb stack at process._tickCallback (internal/process/next_tick.js:63:19)

    npm verb cwd C:\WINDOWS\system32

    npm verb Windows_NT 10.0.18362

    npm verb argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--global" "--production" "npm-windows-upgrade" "--verbose"

    npm verb node v10.16.3

    npm verb npm v6.12.0

    npm ERR! code ECONNRESET

    npm ERR! errno ECONNRESET

    npm ERR! network request to https://registry.npmjs.org/npm-windows-upgrade failed, reason: Client network socket disconnected before secure TLS connection was established

    npm ERR! network This is a problem related to network connectivity.

    npm ERR! network In most cases you are behind a proxy or have bad network settings.

    npm ERR! network

    npm ERR! network If you are behind a proxy, please make sure that the

    npm ERR! network 'proxy' config is set properly. See: 'npm help config'

    npm verb exit [ 1, true ]

    npm timing npm Completed in 116077ms


    WITH NPM REGISTRY SET TO HTTP

    >npm install --global --production npm-windows-upgrade --verbose

    npm info it worked if it ends with ok

    npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe',

    npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',

    npm verb cli 'install',

    npm verb cli '--global',

    npm verb cli '--production',

    npm verb cli 'npm-windows-upgrade',

    npm verb cli '--verbose' ]

    npm info using npm@6.12.0

    npm info using node@v10.16.3

    npm verb npm-session 4cde14186baae336

    npm http fetch GET 304 http://registry.npmjs.org/npm-windows-upgrade 451ms (from cache)

    npm timing stage:loadCurrentTree Completed in 1439ms

    npm timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms

    npm timing stage:loadIdealTree:loadShrinkwrap Completed in 20ms

    npm http fetch GET 304 http://registry.npmjs.org/chalk 137ms (from cache)

    npm http fetch GET 304 http://registry.npmjs.org/debug 139ms (from cache)

    npm http fetch GET 304 http://registry.npmjs.org/commander 146ms (from cache)

    npm http fetch GET 304 http://registry.npmjs.org/cli-spinner 154ms (from cache)

    npm http fetch GET 304 http://registry.npmjs.org/inquirer 155ms (from cache)

    npm http fetch GET 304 http://registry.npmjs.org/prompt 446ms (from cache)

    npm http fetch GET 304 http://registry.npmjs.org/escape-string-regexp 36ms (from cache)

    npm http fetch GET 304 http://registry.npmjs.org/supports-color 117ms (from cache)

    npm http fetch GET 304 http://registry.npmjs.org/ansi-styles 139ms (from cache)


    As you can see from above, no issue if its HTTP. I remember specifically, HTTPS used to work a few months back, so I am not sure what was changed in Windows 10 with the latest update. Below is my Win10 version.


    Edition: Windows 10 Home Single License

    Version: 1903

    OS Build: 18362.418


    I hope somebody can help, or at least have a solution!

    :)
     
    AcidSlide, Oct 18, 2019
    #1
  2. Naki Win User

    GPU-Z what command line parameter ?

    Suggestion: /? (-?) and /help (-help) command-line arguments to show a list of all possible arguments in a small window. *Smile Help getting HTTPS to work in Command Line in Windows 10 (please note that HTTP is working) :)
     
  3. ryanly Win User
    GPU-Z what command line parameter ?

    Current /? (-?) or / help (-help) parameter is invalid
     
    ryanly, Oct 18, 2019
    #3
  4. wkizzlejr Win User

    Help getting HTTPS to work in Command Line in Windows 10 (please note that HTTP is working)

    Silently Uninstalling Windows Updates via Command Line in Windows 10


    Thanks for your assistance, Brink. It wouldn't surprise me in the slightest that it worked in the past. Honestly, this feels like such an unnecessary and unfortunate change that it begs the question whether or not Microsoft is even aware of it.

    I will say that if you log into a Windows 7 asset and type Wusa.exe from the command line, you'll notice that the help prompt shows /uninstall for both file and KB article on the same line with the /quiet parameter listed, rather than the two separate listings shown by Windows 10. Unfortunately, this might suggest that the change is deliberate.
     
    wkizzlejr, Oct 18, 2019
    #4
Thema:

Help getting HTTPS to work in Command Line in Windows 10 (please note that HTTP is working)

Loading...
  1. Help getting HTTPS to work in Command Line in Windows 10 (please note that HTTP is working) - Similar Threads - Help getting HTTPS

  2. Command-line shells, commands like dir /p not working but dir does work

    in Windows 10 Customization
    Command-line shells, commands like dir /p not working but dir does work: I am using W'10, Administrative Windows Power Shell, command line.When I do a "DIR" it works, but when I add parameters, I get this error message:-----------------PS C:\> dir /sdir : Cannot find path 'C:\s' because it does not exist.At line:1 char:1+ dir /s+ ~~~~~~ +...
  3. Command-line shells, commands like dir /p not working but dir does work

    in Windows 10 Gaming
    Command-line shells, commands like dir /p not working but dir does work: I am using W'10, Administrative Windows Power Shell, command line.When I do a "DIR" it works, but when I add parameters, I get this error message:-----------------PS C:\> dir /sdir : Cannot find path 'C:\s' because it does not exist.At line:1 char:1+ dir /s+ ~~~~~~ +...
  4. Command-line shells, commands like dir /p not working but dir does work

    in Windows 10 Software and Apps
    Command-line shells, commands like dir /p not working but dir does work: I am using W'10, Administrative Windows Power Shell, command line.When I do a "DIR" it works, but when I add parameters, I get this error message:-----------------PS C:\> dir /sdir : Cannot find path 'C:\s' because it does not exist.At line:1 char:1+ dir /s+ ~~~~~~ +...
  5. Command Line Video Merging not working in Windows 10

    in Windows 10 Gaming
    Command Line Video Merging not working in Windows 10: You probably know the merging method for videos in Windows using the command line / prompt, just like CD Enter copy/b 0.mp4+1.mp4+2.mp4, etc...That thing is not working on Windows 10. There is a bigger file but the length still same with the first video file. What's the...
  6. Command Line Video Merging not working in Windows 10

    in Windows 10 Software and Apps
    Command Line Video Merging not working in Windows 10: You probably know the merging method for videos in Windows using the command line / prompt, just like CD Enter copy/b 0.mp4+1.mp4+2.mp4, etc...That thing is not working on Windows 10. There is a bigger file but the length still same with the first video file. What's the...
  7. Command Line Video Merging not working in Windows 10

    in Windows 10 Customization
    Command Line Video Merging not working in Windows 10: You probably know the merging method for videos in Windows using the command line / prompt, just like CD Enter copy/b 0.mp4+1.mp4+2.mp4, etc...That thing is not working on Windows 10. There is a bigger file but the length still same with the first video file. What's the...
  8. Windows not working please help

    in Windows 10 BSOD Crashes and Debugging
    Windows not working please help: [IMG]So im a little paranoid as ive never had this kind of issue in the past so im just gonna write timeline of events, any help would be really appreciated as i need to get my pc working as soon as possible for uni So my computer had usually always been fine, I’ve not had...
  9. Command line compact not working?

    in Windows 10 Network and Sharing
    Command line compact not working?: Hi everyone, Windows automatically compressed a lot of my files. I have used the command line "compact /u /s" to uncompact all files in all subfolders in "Documents".... [ATTACH] however, to my surprise, it only uncompressed a small part of the said-folder/subfolders:...
  10. Start button and command line stopped working in Windows 10.

    in Windows 10 BSOD Crashes and Debugging
    Start button and command line stopped working in Windows 10.: After an update of Windows 10 a start button and command line stopped working, internet and sound icons have dissapeared. Can't open the Power User menu either, as computer doesn't respond to "Windows key + X". This therefore makes it nearly impossible to use the computer....