dulwich error when running in docker-compose build poetry install

56 Views Asked by At

I'm trying to run docker-compose build the command is failing on line

RUN --mount=type=ssh poetry install $(if [ "$build_env" = 'production' ];  \
    then echo '--only main --extras=production'; fi) --no-interaction --no-ansi

with the error message

19.57   at /usr/local/venv/lib/python3.11/site-packages/dulwich/protocol.py:215 in read_pkt_line
19.58       211│ 
19.58       212│         try:
19.58       213│             sizestr = read(4)
19.58       214│             if not sizestr:
19.58     → 215│                 raise HangupException
19.58       216│             size = int(sizestr, 16)
19.58       217│             if size == 0 or size == 1:  # flush-pkt or delim-pkt
19.58       218│                 if self.report_activity:
19.58       219│                     self.report_activity(4, "read")
19.58 
19.58 The following error occurred when trying to handle this error:
19.58 
19.58 
19.58   HangupException
19.58 
19.58   [email protected]: Permission denied (publickey).
19.59 
19.59   at /usr/local/venv/lib/python3.11/site-packages/dulwich/client.py:1154 in fetch_pack
19.61       1150│         with proto:
19.61       1151│             try:
19.61       1152│                 refs, server_capabilities = read_pkt_refs(proto.read_pkt_seq())
19.61       1153│             except HangupException as exc:
19.61     → 1154│                 raise _remote_error_from_stderr(stderr) from exc
19.61       1155│             (
19.61       1156│                 negotiated_capabilities,
19.61       1157│                 symrefs,
19.61       1158│                 agent

,

Seems like this is some kind of ssh problem, but I can't understand what exactly. When I run ssh -T [email protected] - it returns me a valid output

1

There are 1 best solutions below

0
Headmaster On

Possible solution is - /usr/bin/ssh-add --apple-use-keychain ~/.ssh/id_ed25519

but still does not work as expected