Issue with Pipeline

Admin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 9, 2025

I have set up this pipeline for my server for php laravel application and i m getting "Host key verifictaion failed" when running pipeline

My pipeline conifguration is

 

 

 

# Template PHP Build

# This template allows you to validate your PHP application.
# The workflow allows running tests and code linting on the default branch.

image: composer:2.0


pipelines:
  default:
    - parallel:
        #- step:
            #name: Test
            #script:
              #- composer install
              #-  ./vendor/bin/phpunit test
            #caches:
              #- composer
        #- step:
            #name: Lint
            #script:
              #- composer install
              #- ./vendor/bin/phplint . --exclude=vendor
            #caches:
              #- composer
        - step:
            name: Deploy to test
            deployment: test
            # trigger: manual  # Uncomment to make this a manual deployment.
            script:
              - echo "Deploying to test environment"  
             
        - step:
            name: Deploying to the hosting server...
            #name: Merge Development into Master and Deploy
            script:
              #- echo "Merging development branch into master..."
              #- git config user.name "Bitbucket Admin"
              #- git config user.email "admin@rapidsmarterp.com"
              #- git checkout main
              #- git merge development --no-edit
              #- echo "Pushing changes to master..."
              #- git push origin main
              - echo "Deploying to the hosting server..."
              - ssh rapidsec@rapidsmartsecutech.com "cd /home/rapidsec/public_html/rapidtesterp && git pull origin main && composer install --no-dev && php artisan migrate --force"

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 10, 2025

Hi @Admin and welcome to the community!

This error means that the host key of the server you are trying to connect to does not exist in the known_hosts file of the client (in this case the client is the Pipelines build).

You can add it the following way (you need to have admin permission to the repo):

  1. Open the repository in Bitbucket Cloud
  2. Select Repository settings from the left sidebar
  3. Select the option SSH Keys (under the section PIPELINES) from the left sidebar
  4. On this page, you will see a section titled Known hosts.

    In the Host address field, enter the hostname of your server, select Fetch, and when the fingerprint is fetched select Add host.

If you do this, the fingerprint of your server will be added to the known_hosts file in Pipelines when you run a build and the issue should no longer occur.

Please feel free to let me know how it goes and if you have any questions!

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events