Skip to content

Cargo install failed due to interfering with git proxy in Ubuntu Linux #14952

Open
@calidion

Description

Problem

when a global git https/http proxy config is set.

cargo install will fail with the following errors:

    Updating crates.io index
warning: spurious network error (3 tries remaining): [35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to index.crates.io:443 )
warning: spurious network error (2 tries remaining): [35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to index.crates.io:443 )
warning: spurious network error (1 tries remaining): [35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to index.crates.io:443 )
error: download of config.json failed

Caused by:
  failed to download from `https://index.crates.io/config.json`

Caused by:
  [35] SSL connect error (OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to index.crates.io:443 )

after removing git config, cargo install will be normal again.

Steps

  1. create a git config file in ~/.gitconfig
  2. add the following config
[https]
	proxy = socks5://127.0.0.1:1080
[http]
	proxy = socks5://127.0.0.1:1080
  1. execute cargo install

Possible Solution(s)

remove git proxy config for http/https.

Notes

No response

Version

cargo 1.85.0-nightly (769f622e1 2024-12-14)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitA-networkingArea: networking issues, curl, etc.C-bugCategory: bugS-needs-team-inputStatus: Needs input from team on whether/how to proceed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions