Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,128
Community Members
 
Community Events
165
Community Groups

Bitbucket CI/CD vs Remote Server

Edited

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 Jun 09, 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
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,237 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you