Skip to content

Should cargo use git proxies for other http requests? #14952

Open
@calidion

Description

@calidion

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitA-networkingArea: networking issues, curl, etc.C-bugCategory: bugS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions