I want to add the cargo dependencies rocket-okapi as git url, now I added the dependencies like in Cargo.toml this:
rocket-okapi = { git = "https://github.com/GREsau/okapi/tree/master/rocket-okapi"} but when I build the project using cargo build command ,shows error like this:
$ cargo build Updating git repository `https://github.com/GREsau/okapi/tree/master/rocket-okapi` warning: spurious network error (2 tries remaining): unexpected http status code: 404; class=Http (34) warning: spurious network error (1 tries remaining): unexpected http status code: 404; class=Http (34) error: failed to get `rocket-okapi` as a dependency of package `fortune v0.1.0 (/workspaces/fortune)` Caused by: failed to load source for dependency `rocket-okapi` Caused by: Unable to update https://github.com/GREsau/okapi/tree/master/rocket-okapi Caused by: failed to fetch into: /home/codespace/.cargo/git/db/rocket-okapi-b6c0b0836896ac76 Caused by: network failure seems to have happened if a proxy or similar is necessary `net.git-fetch-with-cli` may help here https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli Caused by: unexpected http status code: 404; class=Http (34) how to add the sub folder as dependencies in rust cargo? is it possible?
https://github.com/GREsau/okapi.gitinstead of some random point in the repository's tree?rocket_okapi = { git = "https://github.com/GREsau/okapi" }. See this reply to an issue.