{"id":2141,"date":"2022-12-22T09:33:51","date_gmt":"2022-12-22T09:33:51","guid":{"rendered":"https:\/\/www.easydeploy.io\/blog\/?p=2141"},"modified":"2022-12-22T10:29:31","modified_gmt":"2022-12-22T10:29:31","slug":"clone-bitbucket-repository-using-bitbucket-pipeline","status":"publish","type":"post","link":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/","title":{"rendered":"How to Clone another repository data for Bitbucket Pipeline"},"content":{"rendered":"<p data-pm-slice=\"1 1 []\">Bitbucket Pipeline is a <strong>continuous integration and continuous deployment (CI\/CD) <\/strong>service, It helps you to automatically build, test and even deploy your code based on a configuration file in your repository.<\/p>\n<p>In this blog , we are going to explore how to clone a Bitbucket repository in Bitbucket pipeline in simple way, just follow the below commands<\/p>\n<h2 data-pm-slice=\"1 1 []\"><strong>Generate SSH key in pipeline repository <\/strong><\/h2>\n<p>SSH keys are pair of public and private keys that are used to authenticate and establish an encrypted communication between a client and a remote machine over the internet.<\/p>\n<p>Open your <strong>pipeline <\/strong>Bitbucket repository \u2192 click <strong>Repository settings<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/1-4.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline repository settings\" width=\"1501\" height=\"756\" class=\"aligncenter wp-image-2216 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline repository settings\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/1-4.webp 1501w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/1-4-300x151.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/1-4-1024x516.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/1-4-768x387.webp 768w\" sizes=\"(max-width: 1501px) 100vw, 1501px\" \/><\/p>\n<blockquote><p>&nbsp;<\/p>\n<p>Also Learn:\u00a0 How <a href=\"https:\/\/www.easydeploy.io\/blog\/bitbucket-pipeline-trigger-for-changes-in-a-particular-folder\/\" target=\"_blank\" rel=\"noopener\">bitbucket pipeline triggers<\/a> only when changes made in a particular folder<\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<p data-pm-slice=\"1 1 []\">Scroll down and click <strong>SSH keys<\/strong> under pipelines section<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/2-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline ssh key\" width=\"1428\" height=\"789\" class=\"aligncenter wp-image-2217 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline ssh key\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/2-2.webp 1428w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/2-2-300x166.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/2-2-1024x566.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/2-2-768x424.webp 768w\" sizes=\"(max-width: 1428px) 100vw, 1428px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Now you can see a popup message like \u201c<strong>pipelines must be enabled<\/strong>\u201d<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/3-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline setting(pipeline)\" width=\"1383\" height=\"537\" class=\"aligncenter wp-image-2218 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline setting(pipeline)\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/3-2.webp 1383w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/3-2-300x116.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/3-2-1024x398.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/3-2-768x298.webp 768w\" sizes=\"(max-width: 1383px) 100vw, 1383px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Click \u201c<strong>go to settings<\/strong>\u201d you will see the enable option like below screenshot and then enable the pipeline<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/4-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline enable setting(pipeline)\" width=\"1083\" height=\"519\" class=\"aligncenter wp-image-2220 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline enable setting(pipeline)\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/4-2.webp 1083w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/4-2-300x144.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/4-2-1024x491.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/4-2-768x368.webp 768w\" sizes=\"(max-width: 1083px) 100vw, 1083px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Now we have successfully enabled the pipeline !<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/5-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline enabled\" width=\"1132\" height=\"602\" class=\"aligncenter wp-image-2221 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline enabled\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/5-2.webp 1132w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/5-2-300x160.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/5-2-1024x545.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/5-2-768x408.webp 768w\" sizes=\"(max-width: 1132px) 100vw, 1132px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Now scroll down and click the same <strong>SSH keys<\/strong> option under the pipelines section \u2192 click <strong>Generate keys<\/strong><\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/6-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline generate keys\" width=\"1757\" height=\"767\" class=\"aligncenter wp-image-2222 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline generate keys\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/6-2.webp 1757w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/6-2-300x131.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/6-2-1024x447.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/6-2-768x335.webp 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/6-2-1536x671.webp 1536w\" sizes=\"(max-width: 1757px) 100vw, 1757px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Now it will automatically generate private &amp; public key , then <strong>copy the public key<\/strong> for future reference, we want to add this public key in our <strong>source <\/strong>repository<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/7-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline public key\" width=\"1294\" height=\"712\" class=\"aligncenter wp-image-2223 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline public key\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/7-2.webp 1294w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/7-2-300x165.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/7-2-1024x563.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/7-2-768x423.webp 768w\" sizes=\"(max-width: 1294px) 100vw, 1294px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Now open your <strong>source <\/strong>repository(which will contain your codes\/files) \u2192 <strong>Repository settings \u2192 <\/strong>click<strong> Access keys <\/strong>under security section<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/8-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline access key\" width=\"1327\" height=\"721\" class=\"aligncenter wp-image-2224 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline access key\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/8-2.webp 1327w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/8-2-300x163.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/8-2-1024x556.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/8-2-768x417.webp 768w\" sizes=\"(max-width: 1327px) 100vw, 1327px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Now click <strong>Add key<\/strong><\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/9-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline add key\" width=\"1160\" height=\"682\" class=\"aligncenter wp-image-2225 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline add key\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/9-2.webp 1160w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/9-2-300x176.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/9-2-1024x602.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/9-2-768x452.webp 768w\" sizes=\"(max-width: 1160px) 100vw, 1160px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Now Enter the <strong>label name \u2192 <\/strong>paste our <strong>public key<\/strong> under<strong> key<\/strong> section \u2192 click <strong>Add SSH key<\/strong><\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/10-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline public key added\" width=\"1262\" height=\"810\" class=\"aligncenter wp-image-2226 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline public key added\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/10-2.webp 1262w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/10-2-300x193.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/10-2-1024x657.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/10-2-768x493.webp 768w\" sizes=\"(max-width: 1262px) 100vw, 1262px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">We have successfully added our Bitbucket pipeline repository SSH public key to our source repository<\/p>\n<h2><strong>Create pipeline<\/strong><\/h2>\n<p>Now again open your <strong>pipeline repository \u2192 <\/strong>click pipelines \u2192 and then click <strong>create your first pipeline<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/11-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline first pipeline\" width=\"1732\" height=\"775\" class=\"aligncenter wp-image-2227 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline first pipeline\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/11-2.webp 1732w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/11-2-300x134.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/11-2-1024x458.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/11-2-768x344.webp 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/11-2-1536x687.webp 1536w\" sizes=\"(max-width: 1732px) 100vw, 1732px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p data-pm-slice=\"1 1 []\">You will redirected to the content like below screen shot then click <strong>select <\/strong>on<strong> Started pipeline<\/strong><\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/12-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline select\" width=\"1773\" height=\"758\" class=\"aligncenter wp-image-2228 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline select\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/12-2.webp 1773w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/12-2-300x128.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/12-2-1024x438.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/12-2-768x328.webp 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/12-2-1536x657.webp 1536w\" sizes=\"(max-width: 1773px) 100vw, 1773px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Now you will redirected to a <strong>bitbucket-pipelines.yml<\/strong> file<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/13-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline edit file\" width=\"1518\" height=\"818\" class=\"aligncenter wp-image-2229 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline edit file\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/13-2.webp 1518w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/13-2-300x162.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/13-2-1024x552.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/13-2-768x414.webp 768w\" sizes=\"(max-width: 1518px) 100vw, 1518px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Just remove entire content below \u201c<strong>image: atlassian\/default-image:3<\/strong>\u201d line ,<\/p>\n<p>Open your <strong>source<\/strong> repository and click <strong>clone <\/strong>option<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/14-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline clone\" width=\"1230\" height=\"578\" class=\"aligncenter wp-image-2230 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline clone\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/14-2.webp 1230w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/14-2-300x141.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/14-2-1024x481.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/14-2-768x361.webp 768w\" sizes=\"(max-width: 1230px) 100vw, 1230px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p data-pm-slice=\"1 1 []\">By default it will be in <strong>HTTPS <\/strong>option, but now we are going to use <strong>SSH<\/strong> option , so change the option from <strong>HTTPS<\/strong> to <strong>SSH<\/strong> by clicking the dropdown list icon<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/15-2.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline https\" width=\"863\" height=\"608\" class=\"aligncenter wp-image-2231 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline https\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/15-2.webp 863w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/15-2-300x211.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/15-2-768x541.webp 768w\" sizes=\"(max-width: 863px) 100vw, 863px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Switching to SSH and then <strong>copy the git clone URL , <\/strong>we will use this URL in next step, inside <strong>bitbucket-pipelines.yml<\/strong> file<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/16-1.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline ssh\" width=\"890\" height=\"571\" class=\"aligncenter wp-image-2232 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline ssh\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/16-1.webp 890w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/16-1-300x192.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/16-1-768x493.webp 768w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Now replace the 5th line with your <strong>source <\/strong>repository <strong>SSH URL ,<\/strong> which was already copied in previous step<\/p>\n<pre data-pm-slice=\"1 1 []\"><code>pipelines:\r\n  default:\r\n    - step:\r\n        script:\r\n          - git clone git@bitbucket.org:baskey\/source_repo.git\r\n          - ls<\/code><\/pre>\n<p data-pm-slice=\"1 1 []\">Copy the above script and then paste it in <strong>pipeline <\/strong>repository ,under the \u201c<strong>image: atlassian\/default-image:3<\/strong>\u201d line , inside the <strong>bitbucket-pipelines.yml<\/strong> file , like below screenshot and click <strong>commit file<\/strong><\/p>\n<p>It will help us to clone another repository in our pipeline and by using \u201c<strong>ls<\/strong>\u201d we can view the cloned files<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/17-1.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline update\" width=\"1730\" height=\"844\" class=\"aligncenter wp-image-2233 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline update\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/17-1.webp 1730w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/17-1-300x146.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/17-1-1024x500.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/17-1-768x375.webp 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/17-1-1536x749.webp 1536w\" sizes=\"(max-width: 1730px) 100vw, 1730px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p data-pm-slice=\"1 1 []\">Now you will see the success status within few seconds<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/18.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline success\" width=\"1883\" height=\"671\" class=\"aligncenter wp-image-2234 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline success\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/18.webp 1883w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/18-300x107.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/18-1024x365.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/18-768x274.webp 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/18-1536x547.webp 1536w\" sizes=\"(max-width: 1883px) 100vw, 1883px\" \/><\/p>\n<p data-pm-slice=\"1 1 []\">Just click the successful status, you will redirected to appropriate page and then by clicking each command you can see the list of process have done by the pipeline setup like below screen shot<\/p>\n<p data-pm-slice=\"1 1 []\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/19.webp\" alt=\"Clone a Bitbucket repository using Bitbucket Pipeline review\" width=\"1912\" height=\"743\" class=\"aligncenter wp-image-2235 size-full\" title=\"Clone a Bitbucket repository using Bitbucket Pipeline review\" srcset=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/19.webp 1912w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/19-300x117.webp 300w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/19-1024x398.webp 1024w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/19-768x298.webp 768w, https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/19-1536x597.webp 1536w\" sizes=\"(max-width: 1912px) 100vw, 1912px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bitbucket Pipeline is a continuous integration and continuous deployment (CI\/CD) service, It helps you to automatically build, test and even deploy your code based on a configuration file in your repository. In this blog , we are going to explore how to clone a Bitbucket repository in Bitbucket pipeline in simple way, just follow the [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":2394,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[26],"tags":[429],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Clone another repository data for Bitbucket Pipeline<\/title>\n<meta name=\"description\" content=\"Learn &amp; understand how to clone Bitbucket repository data using Bitbucket Pipeline in a continuous integration and deployment CI\/CD service.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Clone another repository data for Bitbucket Pipeline\" \/>\n<meta property=\"og:description\" content=\"Learn &amp; understand how to clone Bitbucket repository data using Bitbucket Pipeline in a continuous integration and deployment CI\/CD service.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/\" \/>\n<meta property=\"og:site_name\" content=\"easydeploy.io\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-22T09:33:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-22T10:29:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/How-to-clone-another-repository-data-for-bitbucket-pipeline.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Baskar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Baskar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/\"},\"author\":{\"name\":\"Baskar\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0262af2f2f7181c9fc1da14688a26c57\"},\"headline\":\"How to Clone another repository data for Bitbucket Pipeline\",\"datePublished\":\"2022-12-22T09:33:51+00:00\",\"dateModified\":\"2022-12-22T10:29:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/\"},\"wordCount\":497,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/How-to-clone-another-repository-data-for-bitbucket-pipeline.webp\",\"keywords\":[\"Bitbucket Pipeline\"],\"articleSection\":[\"DevOps\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/\",\"name\":\"How to Clone another repository data for Bitbucket Pipeline\",\"isPartOf\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/How-to-clone-another-repository-data-for-bitbucket-pipeline.webp\",\"datePublished\":\"2022-12-22T09:33:51+00:00\",\"dateModified\":\"2022-12-22T10:29:31+00:00\",\"description\":\"Learn & understand how to clone Bitbucket repository data using Bitbucket Pipeline in a continuous integration and deployment CI\/CD service.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#primaryimage\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/How-to-clone-another-repository-data-for-bitbucket-pipeline.webp\",\"contentUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/How-to-clone-another-repository-data-for-bitbucket-pipeline.webp\",\"width\":1280,\"height\":720,\"caption\":\"bitbucket pipeline\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.easydeploy.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Clone another repository data for Bitbucket Pipeline\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#website\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/\",\"name\":\"easydeploy.io\",\"description\":\"A Cloud Architect Company\",\"publisher\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.easydeploy.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#organization\",\"name\":\"EasyDeploy Technologies Pvt Ltd\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png\",\"contentUrl\":\"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png\",\"width\":536,\"height\":100,\"caption\":\"EasyDeploy Technologies Pvt Ltd\"},\"image\":{\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0262af2f2f7181c9fc1da14688a26c57\",\"name\":\"Baskar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/63916b522c59a77898bbfc76156c9bc7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/63916b522c59a77898bbfc76156c9bc7?s=96&d=mm&r=g\",\"caption\":\"Baskar\"},\"description\":\"Junior DevOPs Engineer, working @ Easydeploy Technologies Pvt Ltd, Coimbatore, with 1 year of experience, and currently Doing server configurations by automation using Ansible &amp; building strong AWS resources using Terraform, and creating a containerized application using Docker.\",\"url\":\"https:\/\/www.easydeploy.io\/blog\/author\/baskar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Clone another repository data for Bitbucket Pipeline","description":"Learn & understand how to clone Bitbucket repository data using Bitbucket Pipeline in a continuous integration and deployment CI\/CD service.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/","og_locale":"en_GB","og_type":"article","og_title":"How to Clone another repository data for Bitbucket Pipeline","og_description":"Learn & understand how to clone Bitbucket repository data using Bitbucket Pipeline in a continuous integration and deployment CI\/CD service.","og_url":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/","og_site_name":"easydeploy.io","article_published_time":"2022-12-22T09:33:51+00:00","article_modified_time":"2022-12-22T10:29:31+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/How-to-clone-another-repository-data-for-bitbucket-pipeline.webp","type":"image\/webp"}],"author":"Baskar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Baskar","Estimated reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#article","isPartOf":{"@id":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/"},"author":{"name":"Baskar","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0262af2f2f7181c9fc1da14688a26c57"},"headline":"How to Clone another repository data for Bitbucket Pipeline","datePublished":"2022-12-22T09:33:51+00:00","dateModified":"2022-12-22T10:29:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/"},"wordCount":497,"commentCount":0,"publisher":{"@id":"https:\/\/www.easydeploy.io\/blog\/#organization"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#primaryimage"},"thumbnailUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/How-to-clone-another-repository-data-for-bitbucket-pipeline.webp","keywords":["Bitbucket Pipeline"],"articleSection":["DevOps"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/","url":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/","name":"How to Clone another repository data for Bitbucket Pipeline","isPartOf":{"@id":"https:\/\/www.easydeploy.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#primaryimage"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#primaryimage"},"thumbnailUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/How-to-clone-another-repository-data-for-bitbucket-pipeline.webp","datePublished":"2022-12-22T09:33:51+00:00","dateModified":"2022-12-22T10:29:31+00:00","description":"Learn & understand how to clone Bitbucket repository data using Bitbucket Pipeline in a continuous integration and deployment CI\/CD service.","breadcrumb":{"@id":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#primaryimage","url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/How-to-clone-another-repository-data-for-bitbucket-pipeline.webp","contentUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2022\/12\/How-to-clone-another-repository-data-for-bitbucket-pipeline.webp","width":1280,"height":720,"caption":"bitbucket pipeline"},{"@type":"BreadcrumbList","@id":"https:\/\/www.easydeploy.io\/blog\/clone-bitbucket-repository-using-bitbucket-pipeline\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.easydeploy.io\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Clone another repository data for Bitbucket Pipeline"}]},{"@type":"WebSite","@id":"https:\/\/www.easydeploy.io\/blog\/#website","url":"https:\/\/www.easydeploy.io\/blog\/","name":"easydeploy.io","description":"A Cloud Architect Company","publisher":{"@id":"https:\/\/www.easydeploy.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.easydeploy.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.easydeploy.io\/blog\/#organization","name":"EasyDeploy Technologies Pvt Ltd","url":"https:\/\/www.easydeploy.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png","contentUrl":"https:\/\/www.easydeploy.io\/blog\/wp-content\/uploads\/2019\/02\/easydeploy.png","width":536,"height":100,"caption":"EasyDeploy Technologies Pvt Ltd"},"image":{"@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/0262af2f2f7181c9fc1da14688a26c57","name":"Baskar","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.easydeploy.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/63916b522c59a77898bbfc76156c9bc7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/63916b522c59a77898bbfc76156c9bc7?s=96&d=mm&r=g","caption":"Baskar"},"description":"Junior DevOPs Engineer, working @ Easydeploy Technologies Pvt Ltd, Coimbatore, with 1 year of experience, and currently Doing server configurations by automation using Ansible &amp; building strong AWS resources using Terraform, and creating a containerized application using Docker.","url":"https:\/\/www.easydeploy.io\/blog\/author\/baskar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/2141"}],"collection":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/comments?post=2141"}],"version-history":[{"count":10,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/2141\/revisions"}],"predecessor-version":[{"id":2407,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/posts\/2141\/revisions\/2407"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/media\/2394"}],"wp:attachment":[{"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/media?parent=2141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/categories?post=2141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.easydeploy.io\/blog\/wp-json\/wp\/v2\/tags?post=2141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}