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

generate failed when there is a git proxy #664

Open
2 tasks done
tiann opened this issue Jun 21, 2022 · 0 comments
Open
2 tasks done

generate failed when there is a git proxy #664

tiann opened this issue Jun 21, 2022 · 0 comments

Comments

@tiann
Copy link

tiann commented Jun 21, 2022

Describe the bug

When i set a git proxy by:

❯ which gitproxy
gitproxy () {
	git config --global http.proxy 'socks5://127.0.0.1:1081'
	git config --global https.proxy 'socks5://127.0.0.1:1081'
}

The cargo-generate will failed like this:

❯ cargo generate https://github.com/aya-rs/aya-template
⚠️   Favorite `https://github.com/aya-rs/aya-template` not found in config, using it as a git repository: https://github.com/aya-rs/aya-template
Error: Please check if the Git user / repository exists.

Caused by:
    unknown http scheme 'socks5'; class=Http (34)

make sure you

  • I'm on the latest rust version rustup update
  • I'm on the latest cargo-generate version cargo install cargo-generate

To Reproduce
Steps to reproduce the behavior:

  1. set a gitproxy by:
git config --global http.proxy 'socks5://127.0.0.1:1081'
git config --global https.proxy 'socks5://127.0.0.1:1081'

I am sure the proxy is working well, because i can git clone successfully.

  1. Run cargo generate:
cargo generate https://github.com/aya-rs/aya-template

Expected behavior

It works

Screenshots

image

Desktop (please complete the following information):

  • OS: MacOS
  • Version: 12.4
  • Build tools: rustc
  • Shell: zsh
  • rustc --version: rustc 1.61.0 (fe5b13d68 2022-05-18)
  • cargo generate --version: cargo-generate 0.15.2

Additional context

When i disable the git proxy, the cargo-generate works well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant