---
title: "Connecting a Bitbucket Repository to OpenShift"
canonical: "https://kb.uconn.edu/space/IKB/28729868293/Connecting%20a%20Bitbucket%20Repository%20to%20OpenShift"
format: markdown
---
This guide walks you through importing a Bitbucket repository into OpenShift and deploying your application using the web console.

---

## Navigation Overview

The pane on the left of the OpenShift console lists several tabs. In order to create and manage applications and projects, you will need to navigate using these — including **Home**, **Projects**, **Ecosystem**, **Workloads**, **Networking**, and **Storage**.

![OpenShift navigation sidebar](media://051fad66-83a5-4a57-a1d8-33c8d07b716a)

---

## Quick Create

The **+** button in the top right allows you to "Quick Create" an application.

![image](media://de2132b1-29f1-46ad-8f4d-f7d145711c23)

---

## Step 1: Import from Git

Click on the **+** button, and select **"Import from Git"**.

![Select Import from Git from the dropdown](media://53436e05-dee9-4698-bad8-d38d3aa5dea2)

---

## Step 2: Enter Your Repository URL

This will navigate you to the Git import page. Copy and paste the URL address of the repository (not the clone URL), and **ensure it ends in** `.git`.

![The Import from Git page](media://c0bb5b9e-43f7-45dd-8ee4-79b2472024c2)

For example, a Bitbucket URL like:

```
https://bitbucket.org/uconnbitbucket/flask-dashboard/src/main/
```

Should be formatted as:

```
https://bitbucket.org/uconnbitbucket/flask-dashboard.git
```

![Bitbucket repository URL reference](media://9d388288-4ecc-47a4-abbd-9dd620fbe166)

---

## Step 3: Validate Your Repository

After pasting the URL, OpenShift will not recognize the repository because UConn's Bitbucket requires a **secret** to authenticate. Select the dropdown for **"Show advanced Git options"**.

![Repository not yet validated](media://8bc192d2-38c1-4ed0-b3e7-c7cc65667395)

Select the **project** you wish to create the application in, then the respective **secret** to authenticate.

![Repository validated after selecting project and secret](media://95ed2b69-1405-4a50-adfc-08aaab2e5dc9)

---

## Step 4: Advanced Options

You can optionally input specific branches, commits, or subdirectories to build from:

- **Git reference** — Optional branch, tag, or commit
- **Context dir** — Optional subdirectory for the source code

![Git reference and context directory fields](media://5376e50a-e9ec-4af8-b3d0-e97d108c566e)

---

## Step 5: Import Strategy

OpenShift usually detects the correct import method. If not, you can select **Edit Import Strategy** to change this.

![Import strategy detection](media://4283698b-d261-4105-9d29-1717977c3fe1)

---

## Step 6: General, Build, and Deploy Options

When creating an application, you must select an existing **application group** or name a new one.

![Application group selection](media://77ecc44b-5610-45fd-bbae-e31bac75a1be)

Next, name the **component** — this is a unique identifier for the specific application.

![Component name field](media://22476a01-5816-456c-b697-f873d80b7fda)

The **Build** and **Deploy** sections are automatically populated with default configurations. Advanced options are available if needed.

![Default Build and Deploy configurations](media://9c58478a-721b-4144-9653-f4b3444be914)

---

## Step 7: Routing Options

Set the **target port** (e.g., 5000, 8080) and check the box for **"Create a Route"** to publicly expose your URL.

> **Important: **Ensure your target port matches the port specified by your application!

![Target port and route creation options](media://836c76a3-e3ca-42d6-b9a1-c350ec52ae14)

For reference, here is an example Flask application configured to run on port 8080:

![Flask application source code showing port 8080](media://74e1bf42-c67c-4620-bfc1-287541f2666d)

---

## Step 8: Create

Click the blue **Create** button to deploy your application. If required settings are missing, the button will be grayed out and the fields needing attention will be highlighted.

![Create button ready to deploy](media://0df5468e-8152-4a90-98d2-e2fc6611781b)

---

## What Comes Next

After creating your application, you will see a **topological view** with diagnostic information on your deployment. Wait for the process to finish.

![Topology view during deployment](media://b62ae4b3-cc07-492d-95df-1aada043b067)

To return to this view later, navigate to **Projects** in the Home tab, select your project, and click the **"Workloads"** tab to see all your applications.

![Project workloads view](media://a3866550-dc68-4e39-a7c4-10a1545552cc)

---

## Visiting Your Application

Select the **Open URL** button in the top right of the bubble icon for your application in the Topology view.

![Click Open URL to visit your running app](media://68d63bce-c5dd-4e8a-9bda-6b73f6cdf4a0)

Your deployed application is now fully operational:

![The deployed application running successfully](media://97dee7e7-18b2-4f77-b367-1a851e960a05)

---

## Rebuilding Your Application

If you wish to update your deployment (e.g., after pushing a new version to your repository), simply click the **Start Build** button in the application view.

---

*UConn ITS Infrastructure Services — OpenShift Knowledge Base*