Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host: yt-dl.org. is not in the cert's altnames #28196

Closed
TheBrutalSkull opened this issue Feb 18, 2021 · 9 comments
Closed

Host: yt-dl.org. is not in the cert's altnames #28196

TheBrutalSkull opened this issue Feb 18, 2021 · 9 comments

Comments

@TheBrutalSkull
Copy link

Mmmmh... help?
unknown

@sula7
Copy link

sula7 commented Feb 18, 2021

Looks like I have the same issue

Connecting to yt-dl.org (95.143.172.170:443)
ssl_client: yt-dl.org: name `yt-dl.org' not present in server certificate
wget: error getting response: Connection reset by peer

and while youtube-dl -v -U:

CertificateError: hostname u'yt-dl.org' doesn't match either of '*.aries.uberspace.de', 'aries.uberspace.de'

ERROR: can't find the current version. Please try again later.

@JaredStemper
Copy link

For those who are looking for a temporary workaround with cURL: you can turn off cURL's verification of the certificate, using the -k (or --insecure) option.

Please note that as the option said, it is insecure. You shouldn't use this option because it allows man-in-the-middle attacks and defeats the purpose of HTTPS; downloading directly from the yt-dl.org site would be a safe alternative.

@TheBrutalSkull
Copy link
Author

For those who are looking for a temporary workaround with cURL: you can turn off cURL's verification of the certificate, using the -k (or --insecure) option.

Please note that as the option said, it is insecure. You shouldn't use this option because it allows man-in-the-middle attacks and defeats the purpose of HTTPS; downloading directly from the yt-dl.org site would be a safe alternative.

I saw that, and like you said, it's not recommended... So I'm searching for another solution for that... I'm wondering if it's a problem from my code or directly from yt-dl

@JaredStemper
Copy link

Often this is an issue with the host (yt-dl.org) and they will need to fix their certificate. As I mentioned, downloading directly from their site is a secure alternative.

@TheBrutalSkull
Copy link
Author

I downloaded my files on their website, so I don't think this the solution. I think I will wait to see if it's solve. By the way, I use this host for discord bot ^^

@JaredStemper
Copy link

JaredStemper commented Feb 18, 2021

I had the same certificate error as you and sula7 using the cURL/wget command, but I was able to download the tar file from yt-dl to a new virtual machine and use it to successfully download a video from Youtube. So I don't believe their current version is at fault, but rather certificate handling.

@leewc
Copy link

leewc commented Feb 18, 2021

For those that might not want to bother with the tar file, quick copy-paste, referencing the 'latest' release from github:

Hardcoded:

sudo curl -L https://github.com/ytdl-org/youtube-dl/releases/download/2021.02.10/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Alternatively, getting the latest (credits: https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8#gistcomment-3199552) :

curl -s https://api.github.com/repos/ytdl-org/youtube-dl/releases/latest \
| grep 'browser_download_url.*youtube-dl"' \
| cut -d : -f 2,3 | tr -d \" \
| xargs -n 1 sudo curl -o /usr/local/bin/youtube-dl -O -sSL

sudo chmod a+rx /usr/local/bin/youtube-dl

If you need .tar.gz: sudo curl -s https://api.github.com/repos/ytdl-org/youtube-dl/releases/latest | grep 'browser_download_url.*tar.gz"' | cut -d : -f 2,3 | tr -d \" | xargs -n 1 sudo curl -o /usr/local/bin/youtube-dl -O -sSL

The first part generates the latest release link, like:
https://github.com/ytdl-org/youtube-dl/releases/download/2021.02.10/youtube-dl-2021.02.10.tar.gz and pipes it into the curl (sudo required to save to /usr/local/bin.

I can submit a PR to README.md if we want to add this here, though not sure how useful it might be given DMCA takedowns of this repo happen.

@gruselhaus
Copy link

curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /app/yt/youtube-dl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
curl: (60) SSL: no alternative certificate subject name matches target host name 'yt-dl.org'
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

@Kikobeats
Copy link

Kikobeats commented Feb 18, 2021

In addition to the workaround on this issue, I created a tiny microservice for pointing the latest youtube-dl binary available at GitHub releases:

source code is available at https://github.com/microlinkhq/youtube-dl-binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants