-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Dulwich does not support Dumb Git transport #6999
Comments
Hey @rruiter87, does it work if you set fin swimmer |
SSH no, HTTPS yes I set the option with
SSH 🔴
HTTPS 🟢
|
It looks like something to do with your network and/or remote Git service; this will be very hard to debug for anyone but you as you have not provided a repo to test against. cc @jelmer |
Hi @neersighted. The repo was local only and still very new. I only did:
For completeness
Might be the university network though. It is not the first time it causes strange issues :p. |
|
the error looks exactly as though it's in the dulwich code that's trying to handle the dumb transport:
|
Looks like a poorly configured HTTP server that's not returning a content type at all, honestly:
As Content-Type is not mandated by HTTP, Dulwich should be handling this gracefully. As to the system Git client failing over SSH, that smells more like a configuration issue to me, as the invocation is brutally simple: poetry/src/poetry/vcs/git/system.py Line 21 in def1ee8
e.g.
Could you give it a go manually, @rruiter87? |
But this works
|
Ah, I see a critical typo everyone missed:
In all cases, a Can you try again with a well-formed URL? |
SSH failed, HTTPS worked.
|
And the example Git clone based on Poetry's invocation? |
Those two commands say "system git" though, implying it's not related to Dulwich? |
I was hoping you could look at the unhandled |
The None Content-Type is an error handling bug; I agree Dulwich should raise a different exception, but it's not the root cause of the issues @rruiter87 is hitting |
Reactivate Dulwich
add with ssh
add with https
|
The first one is definitively local config, @rruiter87 |
Ah, I think the number of different combinations of protocols/repositories mentioned here confused me. If it is actually a dumb repository then this might be caused by the missing content type. |
See jelmer/dulwich#1097 for "dumb" remote access support in Dulwich |
Thanks for the help people. I'm not going to try and figure it out for now @neersighted, because at least something worked. |
Glancing over the comments here, it looks like the cause was a mix of two things: an invalidly formatted URL and lack of dumb remote repository support in dulwich (masked by incorrect handling of a missing Content-Type header). |
I can confirm that is the case. The output is with the $ poetry add git+https://git.bues.ch/git/crcgen.git -v
Using virtualenv: /tmp/foobar/.venv
NotImplementedError
<bound method AbstractHttpGitClient.fetch_pack of Urllib3HttpGitClient('https://git.bues.ch/git/crcgen.git/', dumb=True)>
at python-poetry/poetry/.venv/lib64/python3.10/site-packages/dulwich/client.py:2092 in fetch_pack
2088│ wants = [cid for cid in wants if cid != ZERO_SHA]
2089│ if not wants:
2090│ return FetchPackResult(refs, symrefs, agent)
2091│ if self.dumb:
→ 2092│ raise NotImplementedError(self.fetch_pack)
2093│ req_data = BytesIO()
2094│ req_proto = Protocol(None, req_data.write)
2095│ (new_shallow, new_unshallow) = _handle_upload_pack_head(
2096│ req_proto, |
Poetry will support this once Dulwich adds support: jelmer/dulwich#1097 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option) and have included the output below.Issue
I'm unable to add git dependencies both via https and ssh. If I just do a regular
git clone <repo>
it works for ssh.HTTPS
SSH
The text was updated successfully, but these errors were encountered: