Skip to content

SSL error with local crates.io #1254

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

Closed
moore3071 opened this issue Feb 13, 2018 · 3 comments
Closed

SSL error with local crates.io #1254

moore3071 opened this issue Feb 13, 2018 · 3 comments

Comments

@moore3071
Copy link
Contributor

I tried to run cargo publish --index=my_path/tmp/index-co after following the instructions in docs/CONTRIBUTION.md. I then received the following error:

error: [35] SSL connect error (error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol)

I traced the error back to this block from openssl by using openssl's CLI. I've also attached two files for some extra info:
cargo_publish.txt
openssl_test.txt

relevant environment info:

  • OpenSSL 1.1.0g 2 Nov 2017
  • OS: Linux
  • distro: Arch

It appears that the response from the local crates.io server to the initial ClientHello is smaller than an SSLv2 ServerHello which forces cargo publish to abort.

@moore3071
Copy link
Contributor Author

After building an Ubuntu 16.04 environment with Vagrant and setting up crates.io, I received the same error when trying to publish to the Vagrant index from within the Vagrant box. I'm fairly confident in saying the error isn't with my environment given these facts.

@jtgeibel
Copy link
Member

@moore3071 what URLs do you have in the /home/my_user/Documents/code/crates.io/tmp/index-co/config.json file? You probably want to just use http://127.0.0.1:8888, that is, not https. If you want to use ssl locally you'll need to put the backend behind nginx or something similar.

@moore3071
Copy link
Contributor Author

I guess I changed that to https at some point. After changing it back, everything worked. Closing this issue as resolved. Thanks, @jtgeibel!

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

2 participants