python-poetry / python-poetry/poetry
poetry install ends up with error unexpectedly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
Description
poetry version: 1.8.2
python: 3.11.7 with conda installed
macOS 13.6.5
poetry install exits with the following error:
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
- Installing autogpt-forge (0.1.0 fd3f8fa): Failed
HangupException
The remote server unexpectedly closed the connection.
at /Volumes/MAC/Applications/anaconda3/lib/python3.11/site-packages/dulwich/protocol.py:215 in read_pkt_line
211│
212│ try:
213│ sizestr = read(4)
214│ if not sizestr:
→ 215│ raise HangupException
216│ size = int(sizestr, 16)
217│ if size == 0 or size == 1: # flush-pkt or delim-pkt
218│ if self.report_activity:
219│ self.report_activity(4, "read")
The following error occurred when trying to handle this error:
HangupException
ssh: Could not resolve hostname https: nodename nor servname provided, or not known
at /Volumes/MAC/Applications/anaconda3/lib/python3.11/site-packages/dulwich/client.py:1154 in fetch_pack
1150│ with proto:
1151│ try:
1152│ refs, server_capabilities = read_pkt_refs(proto.read_pkt_seq())
1153│ except HangupException as exc:
→ 1154│ raise _remote_error_from_stderr(stderr) from exc
1155│ (
1156│ negotiated_capabilities,
1157│ symrefs,
1158│ agent,
Cannot install autogpt-forge.
all configuration files are good with confirmation.
this should be a bug.
Workarounds
it looks like dulwich couldn't handle the https git url. Through document, the issue can be gone around by this:
poetry config experimental.system-git-client true
this makes poetry use external git handle repository operation for the workaround to work.
Poetry Installation Method
install.python-poetry.org
Operating System
macOS
Poetry Version
1.8.2
Poetry Configuration
cache-dir = "/Users/grd/Library/Caches/pypoetry"
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
solver.lazy-wheel = true
virtualenvs.create = false
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/grd/Library/Caches/pypoetry/virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = true
Python Sysconfig
No response
Example pyproject.toml
No response
Poetry Runtime Logs
Installing dependencies from lock file
Package operations: 1 install, 0 updates, 0 removals
- Installing autogpt-forge (0.1.0 fd3f8fa): Failed
HangupException
The remote server unexpectedly closed the connection.
at /Volumes/MAC/Applications/anaconda3/lib/python3.11/site-packages/dulwich/protocol.py:215 in read_pkt_line
211│
212│ try:
213│ sizestr = read(4)
214│ if not sizestr:
→ 215│ raise HangupException
216│ size = int(sizestr, 16)
217│ if size == 0 or size == 1: # flush-pkt or delim-pkt
218│ if self.report_activity:
219│ self.report_activity(4, "read")
The following error occurred when trying to handle this error:
HangupException
ssh: Could not resolve hostname https: nodename nor servname provided, or not known
at /Volumes/MAC/Applications/anaconda3/lib/python3.11/site-packages/dulwich/client.py:1154 in fetch_pack
1150│ with proto:
1151│ try:
1152│ refs, server_capabilities = read_pkt_refs(proto.read_pkt_seq())
1153│ except HangupException as exc:
→ 1154│ raise _remote_error_from_stderr(stderr) from exc
1155│ (
1156│ negotiated_capabilities,
1157│ symrefs,
1158│ agent,
Cannot install autogpt-forge.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing poetry install with the reported Poetry 1.8.2, Python 3.11.7, macOS, and an HTTPS Git dependency such as autogpt-forge. Trace the failure through the reported dulwich/protocol.py and dulwich/client.py locations, comparing the built-in client with experimental.system-git-client. Done means HTTPS Git dependencies install without requiring the workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100