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

cargo deny: 'NTLM' authentication is not supported #435

Closed
lcmgh opened this issue Jul 15, 2022 · 7 comments · Fixed by #520
Closed

cargo deny: 'NTLM' authentication is not supported #435

lcmgh opened this issue Jul 15, 2022 · 7 comments · Fixed by #520
Labels
bug Something isn't working

Comments

@lcmgh
Copy link

lcmgh commented Jul 15, 2022

Describe the bug
cargo deny --format json check advisories

prints

{"fields":{"level":"ERROR","message":"'NTLM' authentication is not supported; class=Http (34)","timestamp":"2022-07-15T09:58:23.082045256Z"},"type":"log"}

cargo-deny 0.12.1

@lcmgh lcmgh added the bug Something isn't working label Jul 15, 2022
@Jake-Shadle
Copy link
Member

What OS is this on?

@lcmgh
Copy link
Author

lcmgh commented Jul 15, 2022

ubuntu0.20.04.1 behind a corp proxy with correct http_proxy, https_proxy and no_proxy set. Other cargo commands work fine. I noticed the same behavior with cargo audit, the error message is just slightly different:

cargo audit
error: couldn't fetch advisory database: git operation failed: 'NTLM' authentication is not supported; class=Http (34)

I tried to exec rm -rf ~/.cargo/advisory-db beforehand as reported in some old issues but that does not help in my case.

@Jake-Shadle
Copy link
Member

You can try adding this to your config to see if that resolves this issue.

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

Otherwise you could add a PR to improve the setup of the libgit2 authentication at

fn fetch_via_git(url: &Url, db_path: &Path) -> Result<(), Error> {
, unfortunately scenarios such as yours rely on contributions from people who actually have a repro for the issue.

@lcmgh
Copy link
Author

lcmgh commented Jul 15, 2022

Setting

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

leads to

$ cargo-deny check advisories
Cloning into '/home/runner/.cargo/advisory-db/github.com-2f857891b7f43c59'...
fatal: unable to access 'https://github.com/rustsec/advisory-db/': Received HTTP code 407 from proxy after CONNECT
2022-07-15 14:10:05 [ERROR] failed to open advisory database: failed to resolve path '/home/runner/.cargo/advisory-db/github.com-2f857891b7f43c59': No such file or directory; class=Os (2); code=NotFound (-3

@Jake-Shadle
Copy link
Member

Ok, well in that case you'd need to make a PR to either improve the libgit2 authentication setup I mentioned above, or the CLI path if it is easier, as I have no idea why git itself would fail if it works in other scenarios.

@lcmgh
Copy link
Author

lcmgh commented Jul 15, 2022

Ok, how is that related to the CLI path?

@Jake-Shadle
Copy link
Member

It's not, I'm saying you could improve either path depending on which is easier for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants