hui
June 25, 2022, 3:29am
1
I want use ssh instead of https.
[root@VM-24-3-centos tiflash-proxy]# cargo build --no-default-features --features ' portable sse test-engines-rocksdb cloud-aws cloud-gcp cloud-azure' --release -Z build-std=core,std,alloc,proc_macro,test --target=x86_64-unknown-linux-gnu -Z unstable-options --out-dir=target/release
Updating git submodule https://github.com/google/protobuf
warning: spurious network error (2 tries remaining): failed to connect to github.com : Connection timed out; class=Os (2)
my ~/.gitconfig had config it!
[url "git://"]
insteadOf = https://
hui
June 25, 2022, 3:34am
2
but under rust dir, there is not config git instead of https
[root@VM-24-3-centos .cargo]# cat /root/.cargo/git/checkouts/rust-protobuf-6d53d5b5de89008a/6642eba/google-protobuf/.git/config
[core]
bare = false
repositoryformatversion = 0
filemode = true
logallrefupdates = true
tiye
June 25, 2022, 6:34am
3
maybe you need an HTTPS proxy?
网络问题就无奈了...
Actually, you could execute git clone manyally, and edit the Cargo.toml to relocate the git:// to the local folder after git clone is finished.
hui
June 25, 2022, 1:32pm
5
I had config Cargo.toml,but also fail
bjorn3
June 25, 2022, 2:38pm
6
It seems that something on your system or network is preventing the connection with github. Do you have a proxy or firewall that is blocking it?
why not using path =
variable for protobuf ?
you could modify all github related Cargo.toml since you already obtained them from github.
riking
June 27, 2022, 6:28am
8
Yes, it's administratively imposed and they don't have access to an unfiltered connection.
We should be shipping tools that don't need live GitHub access.
1 Like
bjorn3
June 27, 2022, 10:10am
9
You can try following the guide at Appendix: Git Authentication - The Cargo Book for how to set up ssh authentication. And if that doesn't work it suggest using the net.git-fetch-with-cli
config to use git's cli for fetching repos instead of libgit2. Also I think you shouldn't pretend to be github, but rather mirror them to your own server and then point cargo to this server.
2 Likes
hui
June 27, 2022, 2:28pm
11
I can clone https://XXX ,but rust build still failed。(Although I config credential)
hui
June 27, 2022, 2:47pm
12
config it is ok!thanks!
[net]
git-fetch-with-cli = true
1 Like
hui
June 27, 2022, 2:48pm
13
because the rust repo is my submodule,I can't change it
hui
June 28, 2022, 1:07am
14
but still build fail!I had config .cargo/config (source.crates-io)
tiye
June 28, 2022, 3:43am
15
did you try adding in ~/.cargo/config
:
[http]
proxy = "localhost:<PORT>"
[https]
proxy = "localhost:<PORT>"
this is my config, don't know whether it works for you.
[source.crates-io]
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
[http]
multiplexing = false
[net]
retry = 5 # network retries
git-fetch-with-cli = true
2 Likes
hui
June 29, 2022, 2:03am
17
It can run, but it will eventually hang. (After 12 hours to check, only 7% progress)
This should be a Chinese only problem.
Thus the reply is written in Chinese.
这个问题最好去rustcc提问
毕竟这不是一个外国人有可能理解的问题。
以及,你这个网速,我相当建议你试一下nginx本地反代
有问题可以在知乎 的评论区提问(github我不会搞评论区)
system
Closed
September 27, 2022, 4:55am
20
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.