rust-lang / git2-rs

libgit2 bindings for Rust
https://docs.rs/git2
Apache License 2.0
1.67k stars 384 forks source link

Failed to clone: authentication required but no callback set #901

Closed ghost closed 1 year ago

ghost commented 1 year ago

Trying to clone a public github repository, but recieving the error 'failed to clone: authentication required but no callback set; class=Ssh (23)' I am using just the HTTP url. no SSH involved.

` let url = "https://github.com/rust-lang/book";

let _ = match Repository::clone(url, path) {
    Ok(_) => {
        println!("cloned the book from github")
    }
    Err(e) => panic!("failed to clone: {}", e),
};

`

ehuss commented 1 year ago

You may want to check if you have an insteadOf in your global git config.

ghost commented 1 year ago

Thanks!