poetry install ends up with error unexpectedly
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.
it looks like dulwich couldn't handle the https git url.
please report it to dulwich
also please provide a way to reproduce this, you did not give either a pyproject.toml or the commands that you typed.