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

warning: spurious network error #9766

Closed
DIMHAKRYT opened this issue Aug 5, 2021 · 4 comments
Closed

warning: spurious network error #9766

DIMHAKRYT opened this issue Aug 5, 2021 · 4 comments
Labels
C-bug Category: bug

Comments

@DIMHAKRYT
Copy link

DIMHAKRYT commented Aug 5, 2021

Issue: When entering the "cargo build" command, an error occurs "warning: spurious network error"

Solution:

On windows go to the folder ".cargo" it is located in C:\Users%USERPROFILE%.cargo
Inside this folder there is a "config.toml" file, if it is not there, it's not scary, create a file with this name
in it, write the following lines:

[net]
git-fetch-with-cli = true

and save, congratulations everything should work!
most likely, the same solution works on Linux.

cargo 1.54.0 (5ae8d74 2021-06-22)
OS Windows 10 LTSC 1809, No Proxy and VPN

I hope my solution will help someone

@DIMHAKRYT DIMHAKRYT added the C-bug Category: bug label Aug 5, 2021
@DIMHAKRYT DIMHAKRYT reopened this Aug 5, 2021
@ehuss
Copy link
Contributor

ehuss commented Aug 5, 2021

Sorry, I'm not sure what this issue is for. Is there something specific you are asking for here?

@DIMHAKRYT
Copy link
Author

Sorry, I'm not sure what this issue is for. Is there something specific you are asking for here?

I created this issue so that people who have the same problem can quickly find a solution, in other issues with similar problems I did not find a solution and described my method.

@arcuru
Copy link

arcuru commented Aug 6, 2021

This change causes Cargo to replace the crates.io registry with one owned by the University of Science and Technology of China.

That is definitely not what people should be doing to fix a network issue, with the possible exception of users within China.

As explained in #9335, only the first two lines are necessary to fix the issue.

[net]
git-fetch-with-cli = true

Please edit the advice in the original post to remove the unnecessary change to the registry in the event that someone else finds this issue and tries to follow it.

@DIMHAKRYT
Copy link
Author

This change causes Cargo to replace the crates.io registry with one owned by the University of Science and Technology of China.

That is definitely not what people should be doing to fix a network issue, with the possible exception of users within China.

As explained in #9335, only the first two lines are necessary to fix the issue.

[net]
git-fetch-with-cli = true

Please edit the advice in the original post to remove the unnecessary change to the registry in the event that someone else finds this issue and tries to follow it.

there was an awkward situation, I will fix it now, thank you for your comment

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

No branches or pull requests

3 participants