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

Failed to get clap dependency #3854

Closed
2 tasks done
iamgabrielsoft opened this issue Jun 17, 2022 · 2 comments
Closed
2 tasks done

Failed to get clap dependency #3854

iamgabrielsoft opened this issue Jun 17, 2022 · 2 comments
Labels
C-bug Category: Updating dependencies

Comments

@iamgabrielsoft
Copy link

iamgabrielsoft commented Jun 17, 2022

Please complete the following tasks

Rust Version

1.61.0

Clap Version

2.33.0

Minimal reproducible code

    let cli = App::new("Editor")
        .version(VERSION)
        .author("Author: Gabriel <https://github.com/iamgabrielsoft>")
        .about("A Rust Editor")
        .arg(
            Arg::with_name("files")
                .multiple(true)
                .takes_value(true)
                .help(
                    r#"The files you wish to edit
                        You can also provide the line number to jump to by doing this:
                        file.txt:100 (This will go to line 100 in file.txt)"#,
                ),
        )
        .arg(
            Arg::with_name("readonly")
                .long("readonly")
                .short("r")
                .takes_value(false)
                .required(false)
                .help("Enable read only mode"),
        )
        .arg(
            Arg::with_name("config")
                .long("config")
                .short("c")
                .takes_value(true)
                // .default_value(&config_dir)
                .help("The directory of the config file"),
        );

Steps to reproduce the bug with the above code

I ran the code multiple times and i still get the same error

Actual Behaviour

Caused by:
failed to load source for dependency clap

Caused by:
Unable to update registry crates-io

Caused by:
failed to fetch https://github.com/rust-lang/crates.io-index

Caused by:
failed to authenticate when downloading repository: git@github.com:rust-lang/crates.io-index

  • attempted ssh-agent authentication, but no usernames succeeded: git

if the git CLI succeeds then net.git-fetch-with-cli may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
no authentication available

Expected Behaviour

it should run smoothly without any error response from the compiler

Additional Context

No response

Debug Output

No response

@iamgabrielsoft iamgabrielsoft added the C-bug Category: Updating dependencies label Jun 17, 2022
@epage
Copy link
Member

epage commented Jun 18, 2022

Looks like something weird is going on between cargo, your git configuration, and/or your SSH configuration. I'd recommend reaching out to one of the user forums to get help debugging that issue.

@epage epage closed this as completed Jun 18, 2022
@iamgabrielsoft
Copy link
Author

yeah i figured it out, its was coming from my ssh and github

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

No branches or pull requests

2 participants