TLS not working at all for Ubuntu in WSL
I recently reinstalled my computer and installed Linux Subsystem which I always do. So this is a complete new install. When I wanted to run composer I noticed something strange. It failed because it was unable to establish a TLS connection.
[RuntimeException] Failed to clone https://github.com/inquam/colors.php via https, ssh protocols, aborting.
- https://github.com/inquam/colors.php Cloning into bare repository '/home/danlil/.cache/composer/vcs/https---
github.com-inquam-colors.php'...
fatal: unable to access 'https://github.com/inquam/colors.php/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
- git@github.com:inquam/colors.php
Cloning into bare repository '/home/danlil/.cache/composer/vcs/https---github.com-inquam-colors.php'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Permission denied (public key).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
After trying a bit more I noticed that this happens no matter which GitHub repository I try to clone via https and it also applies to any connection via curl or other commands that connect using TLS. I have tried several proposed solutions in other threads like updating ca-certificates, reinstalling Ubuntu on Windows 10, downloading https://curl.haxx.se/ca/cacert.pem and pointing to that in php.ini, making sure ipv6 is not the preferred method in Ubuntu etc.
Previously when I have used Ubuntu in Windows 10 I have just installed and everything has worked without any issues like this at all.
Testing the Windows version of GIT and worked fine.
To demonstrate it seems to affect every Bash application I tested the following too
me@DATHREADRIPPER:/mnt/e/src$ **php -r 'echo
file_get_contents("https://packagist.org/packages.json");'**
PHP Warning: file_get_contents(): Failed to enable crypto in Command line
code on line 1
PHP Warning: file_get_contents(https://packagist.org/packages.json): failed to open stream: operation failed in Command line code on line 1
and
me@DATHREADRIPPER:/mnt/e/src$ **wget https://www.youtube.com/**
--2018-04-22 19:51:13-- https://www.youtube.com/
Resolving www.youtube.com (www.youtube.com)... 172.217.21.174, 216.58.207.206, 216.58.211.142, ...
Connecting to www.youtube.com (www.youtube.com)|172.217.21.174|:443... connected.
Unable to establish SSL connection.
The version installed is
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
windows ssl windows-subsystem-for-linux tls
add a comment |
I recently reinstalled my computer and installed Linux Subsystem which I always do. So this is a complete new install. When I wanted to run composer I noticed something strange. It failed because it was unable to establish a TLS connection.
[RuntimeException] Failed to clone https://github.com/inquam/colors.php via https, ssh protocols, aborting.
- https://github.com/inquam/colors.php Cloning into bare repository '/home/danlil/.cache/composer/vcs/https---
github.com-inquam-colors.php'...
fatal: unable to access 'https://github.com/inquam/colors.php/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
- git@github.com:inquam/colors.php
Cloning into bare repository '/home/danlil/.cache/composer/vcs/https---github.com-inquam-colors.php'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Permission denied (public key).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
After trying a bit more I noticed that this happens no matter which GitHub repository I try to clone via https and it also applies to any connection via curl or other commands that connect using TLS. I have tried several proposed solutions in other threads like updating ca-certificates, reinstalling Ubuntu on Windows 10, downloading https://curl.haxx.se/ca/cacert.pem and pointing to that in php.ini, making sure ipv6 is not the preferred method in Ubuntu etc.
Previously when I have used Ubuntu in Windows 10 I have just installed and everything has worked without any issues like this at all.
Testing the Windows version of GIT and worked fine.
To demonstrate it seems to affect every Bash application I tested the following too
me@DATHREADRIPPER:/mnt/e/src$ **php -r 'echo
file_get_contents("https://packagist.org/packages.json");'**
PHP Warning: file_get_contents(): Failed to enable crypto in Command line
code on line 1
PHP Warning: file_get_contents(https://packagist.org/packages.json): failed to open stream: operation failed in Command line code on line 1
and
me@DATHREADRIPPER:/mnt/e/src$ **wget https://www.youtube.com/**
--2018-04-22 19:51:13-- https://www.youtube.com/
Resolving www.youtube.com (www.youtube.com)... 172.217.21.174, 216.58.207.206, 216.58.211.142, ...
Connecting to www.youtube.com (www.youtube.com)|172.217.21.174|:443... connected.
Unable to establish SSL connection.
The version installed is
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
windows ssl windows-subsystem-for-linux tls
add a comment |
I recently reinstalled my computer and installed Linux Subsystem which I always do. So this is a complete new install. When I wanted to run composer I noticed something strange. It failed because it was unable to establish a TLS connection.
[RuntimeException] Failed to clone https://github.com/inquam/colors.php via https, ssh protocols, aborting.
- https://github.com/inquam/colors.php Cloning into bare repository '/home/danlil/.cache/composer/vcs/https---
github.com-inquam-colors.php'...
fatal: unable to access 'https://github.com/inquam/colors.php/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
- git@github.com:inquam/colors.php
Cloning into bare repository '/home/danlil/.cache/composer/vcs/https---github.com-inquam-colors.php'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Permission denied (public key).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
After trying a bit more I noticed that this happens no matter which GitHub repository I try to clone via https and it also applies to any connection via curl or other commands that connect using TLS. I have tried several proposed solutions in other threads like updating ca-certificates, reinstalling Ubuntu on Windows 10, downloading https://curl.haxx.se/ca/cacert.pem and pointing to that in php.ini, making sure ipv6 is not the preferred method in Ubuntu etc.
Previously when I have used Ubuntu in Windows 10 I have just installed and everything has worked without any issues like this at all.
Testing the Windows version of GIT and worked fine.
To demonstrate it seems to affect every Bash application I tested the following too
me@DATHREADRIPPER:/mnt/e/src$ **php -r 'echo
file_get_contents("https://packagist.org/packages.json");'**
PHP Warning: file_get_contents(): Failed to enable crypto in Command line
code on line 1
PHP Warning: file_get_contents(https://packagist.org/packages.json): failed to open stream: operation failed in Command line code on line 1
and
me@DATHREADRIPPER:/mnt/e/src$ **wget https://www.youtube.com/**
--2018-04-22 19:51:13-- https://www.youtube.com/
Resolving www.youtube.com (www.youtube.com)... 172.217.21.174, 216.58.207.206, 216.58.211.142, ...
Connecting to www.youtube.com (www.youtube.com)|172.217.21.174|:443... connected.
Unable to establish SSL connection.
The version installed is
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
windows ssl windows-subsystem-for-linux tls
I recently reinstalled my computer and installed Linux Subsystem which I always do. So this is a complete new install. When I wanted to run composer I noticed something strange. It failed because it was unable to establish a TLS connection.
[RuntimeException] Failed to clone https://github.com/inquam/colors.php via https, ssh protocols, aborting.
- https://github.com/inquam/colors.php Cloning into bare repository '/home/danlil/.cache/composer/vcs/https---
github.com-inquam-colors.php'...
fatal: unable to access 'https://github.com/inquam/colors.php/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
- git@github.com:inquam/colors.php
Cloning into bare repository '/home/danlil/.cache/composer/vcs/https---github.com-inquam-colors.php'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Permission denied (public key).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
After trying a bit more I noticed that this happens no matter which GitHub repository I try to clone via https and it also applies to any connection via curl or other commands that connect using TLS. I have tried several proposed solutions in other threads like updating ca-certificates, reinstalling Ubuntu on Windows 10, downloading https://curl.haxx.se/ca/cacert.pem and pointing to that in php.ini, making sure ipv6 is not the preferred method in Ubuntu etc.
Previously when I have used Ubuntu in Windows 10 I have just installed and everything has worked without any issues like this at all.
Testing the Windows version of GIT and worked fine.
To demonstrate it seems to affect every Bash application I tested the following too
me@DATHREADRIPPER:/mnt/e/src$ **php -r 'echo
file_get_contents("https://packagist.org/packages.json");'**
PHP Warning: file_get_contents(): Failed to enable crypto in Command line
code on line 1
PHP Warning: file_get_contents(https://packagist.org/packages.json): failed to open stream: operation failed in Command line code on line 1
and
me@DATHREADRIPPER:/mnt/e/src$ **wget https://www.youtube.com/**
--2018-04-22 19:51:13-- https://www.youtube.com/
Resolving www.youtube.com (www.youtube.com)... 172.217.21.174, 216.58.207.206, 216.58.211.142, ...
Connecting to www.youtube.com (www.youtube.com)|172.217.21.174|:443... connected.
Unable to establish SSL connection.
The version installed is
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
windows ssl windows-subsystem-for-linux tls
windows ssl windows-subsystem-for-linux tls
edited Apr 22 '18 at 18:30
Android Dev
10.7k63259
10.7k63259
asked Apr 22 '18 at 18:14
inquaminquam
1113
1113
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1027246%2ftls-not-working-at-all-for-ubuntu-in-wsl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1027246%2ftls-not-working-at-all-for-ubuntu-in-wsl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown