Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket CI/CD vs Remote Server

Arthur Harutyunyan June 7, 2022

Hey Community !!

Im new in Bitbucket Pipelines, now want to setup a simple pipeline to deploy my code to the remote server. What I did:

 

  1. I dont have root permission on my remote server, and connecting with username@host
  2. Generated ssh-keys, added the .pub one to the repo "Access Keys"
  3. Generated ssh-key pairs in repository settings, and added the public one to my authorized keys 

There are 2 issues Im facing right now:

  1. When trying to fetch the fingerprint of the remote host, getting "Unable to fetch fingerprints, check host SSH connection and try again". Here Im passing the IP address 
  2. And my pipeline just does not work, this is probably because of 1)

And this is my .ym file:

pipelines:
default:
- step:
name: Deploy to production
deployment: production
script:
- echo "Deploying to staging environment"
- pipe: atlassian/ssh-run:0.2.2
variables:
SSH_USER: 'myuser'
SERVER: 'xx.yy.zz.qq'
COMMAND: touch /home/myuser/file.txt
Just trying to create a file in my home directory

Can you please help me to figure out what Im doing wrong here, and how can I fix the issue. I could not find any useful info to fix the issue

 

Thanks, 

Arthur

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 9, 2022

Hello @Arthur Harutyunyan ,

Thank you for reaching out to Atlassian Community.

The fetch fingerprint usually fails when bitbucket is being blocked to access your server because of a firewall.

In this case, could you please make sure that : 

You can also execute the below commands both locally and in the pipelines to check if there's any connection issue between the pipelines infrastructure and your ssh host :

nmap -v -Pn <IP ADDRESS of the host> -p 22
ssh-keyscan -t rsa <IP ADDRESS of the host>

 Hope that helps! Let me know in case you have any questions or run into any issues.

Thank you, @Arthur Harutyunyan .

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events