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

Bitbucket Pipelines - SSH Connection

Sebastian Erdt March 26, 2019

Hello, everybody,

I have a basic question about generating an SSH connection with the Bitbucket pipelines to a local Linux computer. In the picture the corresponding procedure is described:

pipelines.PNG

Now here are some questions of understanding:

  1. private key: What exactly does "~/.ssh/config" mean? Which directory is that exactly? Where is the directory? How is the private key copied to this directory? When exactly does this transfer happen? Is this done manually or automatically? Is this done as a file?
  2. public key:Does the public key have to be copied manually into the directory "~/.ssh/authorized_keys" of the local Linux computer? Does this file have to be created first? Does the SSH key have to be put into the repository as a file? If so, what exactly does the file have to look like? 

I am very grateful for any help or tip that might help me.

Many greetings
Sebastian

 

 

1 answer

0 votes
Linette
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 16, 2019

An SSH public and private key pair must be added to the Bitbucket Cloud repository and the public key must be added to the remote service or machine (in this case your linux machine).


in answer to your questions:
What exactly does "~/.ssh/config" mean? This is a file called 'config' located in a directory called .ssh which is in you home directory. Now because the starts with .  it's hidden.

 

 

This page tells you how to set up ssh on a local machine: https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html
Make sure to click on the 'expand details' links to get a step by step by step commands for how to copy things to the right place.


This might be useful for understanding how the commands work, BUT if you just want a pipeline to be access your local machine then make a key under Pipelines SSH key
(In your repository click Settings and under the Pipelines heading select SSH keys). and copy the public key to your linux machine.

Sebastian Erdt April 17, 2019

Hello Linette,

Thank you very much for your tips.

What do you exactly mean with 'An SSH public and private key pair must be added to the Bitbucket Cloud repository'? 

Do you mean that the SSH key must be added to the Bitbucket Cloud repository as a file or something else or do you mean that the SSH key must be added to the settings of the repository SETTINGS - PIPELINES - SSH keys?

 

Thanks a lot,

Sebastian

Linette
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 17, 2019

There are a few ways it can be done, but the easiest is probably to do it in settings > pipelines > ssh keys.

Here you can either generate a key that you then need to add to your linux machine, or if you've generated a key on your linux machine already (using the guide I linked to), you can add them into pipelines by selecting 'use my own keys'.

2019-04-18_14-31-09.png

 

2019-04-18_14-34-07.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events