---
title: "Automated Build fails to deploy the code"
date: "2023-09-27T17:30:44+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/93951-automated-build-fails-deploy-code"
id: "54a49ca9-0792-4d16-bded-26d0a3957e4a"
---

Table of contents will be added

**Issue**
---------

  
Automated Build(Jenkins) has suddenly stopped working & not able to deploy code from Remote Repository to Acquia server & throwing error as:

    ssh_exchange_identification: Connection closed by remote host
    fatal: Could not read from remote repository.

**Resolution**
--------------

*   Change to the `jenkins` user and run the command manually:

    git ls-remote -h git@bitbucket.org:person/projectmarket.git HEAD

*       You will get the standard SSH warning when first connecting to a new host via SSH:
    

    The authenticity of host 'bitbucket.org (207.223.240.181)' can't be established.
    RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
    Are you sure you want to continue connecting (yes/no)?

*       Type yes and press Enter. The host key for Remote Repository will now be added to the ~/.ssh/known_hosts file and you won't get this error in Jenkins anymore.​​​​
    

**Cause**
---------

The issue happens when Acquia reboots/relaunches the Git repository server due to some issues, which probably changes the host key.