-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 fails when git is configured to use SSH for github.com #3900
Comments
Historically issues with Circle CI and Rust have boiled down to #1851, so maybe this is just a dupe of that? |
I'm not really sure, but it seems that this is more of a libgit2 issue than a cargo issue. The relevant cargo code seems to be this. From the output we see that the url it talks about is the https one. In the fetch call, the url is not changed, but given directly to the git2 crate, which is only a wrapper over libgit2. Also, while the string "Malformed URL" doesn't appear in the cargo codebase, it does in the libgit2 one. AFAIK it is possible to compile libgit2 without ssh support. Maybe that's what Circle CI has done, and now libgit2 considers the ssh url as malformed? |
Yup, I can't reproduce. I've added this to
and doing
This is not the error message from above. |
Cargo statically links libgit2 so this may not be related to the version on Circle CI I think? My guess is it's the colon after |
Yup seems you are right with your guess. According to this post (apparently by a person with the same issue), the gitconfig looks like:
Note the missing |
This comment describes the behaviour for me with The behaviour for me with I never got #2845. |
I'm going to close this in favor of #2078 as I believe that's the root cause here. |
Trying to build a Rust program on Circle CI:
I'd never seen this error before, but I found this blog post (not English, but you can get the gist): https://andelf.github.io/blog/2016/11/18/circleci-meets-rust/
In case that link 404s, the issue is that Circle CI has something in ~/.gitconfig that configures Git to use the SSH protocol for connections to github.com. The workaround recommended in the blog post is to use sed in a previous build step to make the line a no-op:
Is there something Cargo can do to mitigate this?
This is the closest Cargo issue I could find is #2845. Not sure if it's related.
The text was updated successfully, but these errors were encountered: