leptos-rs / cargo-leptos

Build tool for Leptos (Rust)
MIT License
314 stars 87 forks source link

Cannot Create New Project from Template with .gitconfig in place #232

Closed tdrozdowski closed 3 months ago

tdrozdowski commented 4 months ago

A .gitconfig that uses insteadOf seems to break the new command:

cargo -v leptos new -v --git leptos-rs/start-axum
Error: Please check if the Git user / repository exists.

Caused by:
    invalid or unknown remote ssh hostkey; class=Ssh (23); code=Certificate (-17)

If I temporarily remove the .gitconfig I'm able to run the command.

.gitconfig looks like:

[url "ssh://git@github.com/"]
        insteadOf = https://github.com/
gbj commented 4 months ago

Maybe try using the full path to the repo insted? This is just an alias for cargo leptos new --git https://github.com/leptos-rs/start-axum. If that doesn't work it's likely a cargo-generate issue, which this command uses internally.

tdrozdowski commented 4 months ago

Yeah, I tried that as well and no luck. In the short term I simply moved the file - ran it to generate my project stubs - and then put it back.

gbj commented 4 months ago

Does cargo-generate work for you with that file?

tdrozdowski commented 3 months ago

No it didn't. Looking at cargo-generate project I see the following issue that is exactly what I hit - so will track this. Thanks! https://github.com/cargo-generate/cargo-generate/issues/874