Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

542
Visualizações
Host key verification failed when building image with docker-compose from a private repo over ssh

Inside my docker-compose.yml I'm using ssh address context to build a Docker image.

ui:
    build:
      context: git@my.git.host:ui/ui.git
      dockerfile: Dockerfile.prod
    container_name: ui
    ports:
      - "4200:4200"
    command: ember serve

Running docker-compose build ui gives me :

compose.cli.verbose_proxy.proxy_callable: docker build -> <generator object APIClient._stream_helper at 0x7faa8bc107d8>
ERROR: compose.cli.errors.log_api_error: error fetching: Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

If I build the image using docker build it works normally

docker build git@my.git.host:ui/ui.git -f Dockerfile.prod

My context

compose.cli.command.get_client: docker-compose version 1.21.0, build unknown
docker-py version: 4.0.1
CPython version: 3.6.7
OpenSSL version: OpenSSL 1.1.1  11 Sep 2018

LATER EDIT:
I managed to reproduce the issue using the docker pip

import docker
client = docker.APIClient()
log = client.build(path="git@my.git.host:ui/ui.git", dockerfile="Dockerfile.prod")
for chunk in log:
  print(loc)

Output:

docker.errors.APIError: 500 Server Error: Internal Server Error ("error fetching: Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
: exit status 128")
over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda