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

Using SSH for Cloning in Bitbucket Pipelines

Oguz Gurler August 21, 2023

Hello everyone!

I'm curious if it's possible to change the way Bitbucket Pipelines clone our repositories from HTTPS to SSH. Has anyone here done this before? If so, could you kindly share the steps or pointers on how to make this switch?

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 21, 2023

G'day, @Oguz Gurler 

Please specify which part of the connection you are attempting to modify. Are you looking to make changes during the initial build setup, or are you referring to adjustments within the build steps?

Unfortunately, if you intend to modify the connection during the build setup, this isn't feasible. However, if you seek to alter the connection within the build steps, you can adjust it according to your preferences.

For build steps, you can check the following page on how to clone in pipeline steps via SSH from another repository:

https://bitbucket.org/blog/cloning-another-bitbucket-repository-in-bitbucket-pipelines

Regards,
Syahrul

Oguz Gurler August 22, 2023

G'day, @Syahrul 

We don't want to clone another repo.

At "Build setup", pipeline cloning repository which will be built, via https. We need to learn that is there any way to change this to ssh?

 

Regards,

Oguz

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 22, 2023

Hi @Oguz Gurler 

Thanks for the update. Unfortunately, that is not possible. The default clone during build setups is only via HTTPS.

That said, Interested to understand why you wish to change the connection.

Cheers,
Syahrul

Oguz Gurler August 23, 2023

Hi @Syahrul 

We are trying to change the connection because have timeout problem when cloning with HTTPS.

We also asked the a question about this problem:

https://community.atlassian.com/t5/Bitbucket-questions/Experiencing-Inconsistent-and-Lengthy-Code-Clone-Times-in/qaq-p/2440611

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 23, 2023

Hi @Oguz Gurler 

Thanks for the update. I suggest responding to one of my coworkers, Theodora, on the questions she has to investigate the issue further.

However, for this question, the answer is no, we can't change the build setups clone connection.

Regards,
Syahrul

Suggest an answer

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

Atlassian Community Events