# Creating your project

You can create projects by importing your DevOps platform repositories which automatically binds new projects to the respective repository. This binding has many advantages, see [binding-with-dop](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/about-sonarqube-cloud-solution/resources-structure/binding-with-dop "mention") for more details. Users will need the Create Projects permission in their organization. You can also create projects manually. However, manually created projects are unbound.

{% hint style="info" %}

* Repository import is only possible if your SonarQube Cloud organization is bound to its corresponding DevOps platform organization (i.e. the DevOps platform organization has been imported to SonarQube Cloud).
* By default, the visibility of newly created projects is set to private.
  {% endhint %}

## Importing a repository selection <a href="#importing-repos" id="importing-repos"></a>

1. On the top right of the SonarQube Cloud interface, select the ✚ (plus) menu and select **Analyze new project**. The **Analyze projects** page opens.
2. Select your organization.
3. Select the repositories you want to import. The **Set up** button shows up.

<figure><img src="broken-reference" alt="Select at least one repository in the left section. The Set up button shows up."><figcaption></figcaption></figure>

4. Select the **Set up** button.
5. Select the new code definition for your project, see [about-new-code](https://docs.sonarsource.com/sonarqube-cloud/standards/about-new-code "mention") for more details.
6. Select the **Create project** button. The project is created and the [automatic-analysis](https://docs.sonarsource.com/sonarqube-cloud/analyzing-source-code/automatic-analysis "mention") is started if supported.

{% hint style="info" %}
To import a monorepo, see [monorepo-support](https://docs.sonarsource.com/sonarqube-cloud/analyzing-source-code/monorepo-support "mention").
{% endhint %}

## Bulk importing all repositories <a href="#bulk-import" id="bulk-import"></a>

*This feature is supported for GitHub organizations only (in beta).*

### About this feature <a href="#about" id="about"></a>

You can import all existing repositories from your DevOps Platform organization in a bulk operation.

However, the following repositories will be skipped during the bulk import:

* Repositories that have already been imported.
* Public repositories, if your SonarQube Cloud organization is configured only for private projects.
* Private repositories, if your SonarQube Cloud organization plan does not support private repositories.

{% hint style="warning" %}
When importing from a GitHub organization, the bulk import process will only retrieve and process repositories authorized via the installed SonarQube Cloud app.
{% endhint %}

You can track the progress of the import using a banner that displays the total number of repositories being processed. You have the option to stop the operation at any time; however, stopping the import will not undo the processing of repositories that have already been completed.

Upon completion of the bulk import, a downloadable CSV import report is generated. This file details all processed repositories, indicating their status (Imported, Skipped, or Failed) along with any relevant supplementary information.

### Starting and monitoring the import <a href="#starting" id="starting"></a>

{% hint style="warning" %}
Ensure your plan grants enough private lines of code (LOC). To change your LOC limit, see [#changing-loc](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-subscription/changing-plan#changing-loc "mention").
{% endhint %}

To import all the existing repositories of your GitHub organization:

1. On the top right of the SonarQube Cloud interface, select the ✚ (plus) menu and select **Analyze new project**. The **Analyze projects** page opens.
2. Select your organization.

<figure><img src="broken-reference" alt="Select the Report all repositories button."><figcaption></figcaption></figure>

3. In **Bulk import all repositories** on the right side, select **Import all repositories**. Note that  the button is only available if you don’t select any repository on the left side . \
   The auto-import starts and you can monitor the operation in the progress banner as illustrated below.&#x20;
   1. **Processed**: Number of repositories that have been processed / Total number of repositories to process.
   2. **Imported**: Number of successfully imported repositories.
   3. **Failed**: Number of repositories that could not be imported. Failures stem from SonarQube Cloud API issues.
   4. **Skipped**: Number of repositories excluded from the import due to ineligibility. For more information, see [#about](#about "mention").

<figure><img src="broken-reference" alt="The banner shows the progress of the bulk import of repositories."><figcaption></figcaption></figure>

{% hint style="warning" %}

* If you navigate away from the current tab or refresh it, the ongoing import will pause. Click **Resume** in the progress banner to continue.\ <img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2FgSy0OBxlxGeJsIeoyGih%2Fsonarqube-cloud-bulk-import-of-repositories-paused_Cs0191.png?alt=media&#x26;token=0cac418b-17d4-4725-a2b5-555e906bd5b5" alt="" data-size="original">
* The total number of GitHub repositories to process may not include all of your organization's repositories. This is because only GitHub repositories authorized through the SonarQube Cloud app installed for your organization are eligible for import. To ensure all repositories are authorized for import, you must select **All repositories** in the Repository Access settings for your GitHub organization. More information can be found in [#modifying-repository-access](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-github-organization#modifying-repository-access "mention"). Note that some public repositories may appear on the left side of the **Analyze projects** page, even if they have not been authorized through the app. These repositories will not be included in the bulk import.
  {% endhint %}

After the import is finished, a completion banner will display. In the banner, select the **View summary** link to view the import report (see below).&#x20;

<figure><img src="broken-reference" alt="The complete banner is shown at the end of a successful bulk import of repositories."><figcaption></figcaption></figure>

To dismiss the banner, click the X icon located on the far right.

### Viewing the import report <a href="#viewing-report" id="viewing-report"></a>

Upon completion of the bulk import, a downloadable CSV import report is generated. This file details all processed repositories, indicating their status (Imported, Skipped, or Failed) along with any relevant supplementary information.

To view the CSV import report:

1. In the complete or error banner, select the **View summary** link. The Summary of bulk import opens.
2. Select the **Download CSV list** button to download the CSV report.

<figure><img src="broken-reference" alt="Select Download CSV list to export the import report to CSV."><figcaption></figcaption></figure>

### Stopping the import <a href="#stopping" id="stopping"></a>

To stop the import, select **Stop** in the progress banner and confirm.&#x20;

<figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2FgJPyNCaPhHHFkVGbMVMl%2Fsonarqube-cloud-stop-bulk-import-of-repositories_Cs0192.png?alt=media&#x26;token=dfb70bdc-9dff-445d-8acb-ebd4f52a8d4c" alt=""><figcaption></figcaption></figure>

The stopping of the import will not remove repositories that have already been processed. To delete imported projects, see [deleting-project](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/administering-your-projects/deleting-project "mention").

{% hint style="info" %}
The import proceeds in batches of 25 repositories. Consequently, selecting **Stop** will not halt the process immediately but will allow the currently active batch to complete.
{% endhint %}

### If the import stops on an error <a href="#if-error" id="if-error"></a>

If the import stops on an error, an error banner will be displayed. Wait 10 to 15 minutes before attempting to retry the process. You may need to repeat this step if the import continues to fail.&#x20;

<figure><img src="broken-reference" alt="The failure banner is shown when the bulk import stops on an error."><figcaption></figcaption></figure>

{% hint style="info" %}
Any repositories that were successfully imported will remain and will not be removed. To view the list of imported repositories, select the View summary link in the banner. See [#viewing-the-import-report](#viewing-the-import-report "mention") for more details.
{% endhint %}

## Auto-import of new repositories <a href="#auto-import" id="auto-import"></a>

*This feature is supported only for GitHub organizations.*

If the feature is enabled in your GitHub organization, newly added or created repositories in your GitHub organization are automatically imported into SonarQube Cloud. For more information, see [auto-import-new-repos](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-organization/manage-org-projects/auto-import-new-repos "mention").

## Creating a project manually <a href="#creating-manually" id="creating-manually"></a>

1. On the top right of the SonarQube Cloud interface, select the ✚ (plus) menu and select **Analyze new project**. The **Analyze projects** page opens.
2. On the right of the page, select **create a project manually**.
3. Select the organization, enter the project name and key, and set project's visibility.
4. Click **Next**.
5. Select the new code definition for your project, see [about-new-code](https://docs.sonarsource.com/sonarqube-cloud/standards/about-new-code "mention").
6. Select the **Create project** button. The project is created. You must now set up your [overview-of-integrated-cis](https://docs.sonarsource.com/sonarqube-cloud/analyzing-source-code/ci-based-analysis/overview-of-integrated-cis "mention"). Automatic analysis is not supported for unbound projects.

## Related pages <a href="#related-pages" id="related-pages"></a>

* [devops-platform-integration](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/administering-your-projects/devops-platform-integration "mention") for your project
* [setting-permissions](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/administering-your-projects/setting-permissions "mention")
* [changing-binding](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/administering-your-projects/changing-binding "mention")&#x20;
* [customizing-info-page](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/administering-your-projects/customizing-info-page "mention")
* [deleting-project](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/administering-your-projects/deleting-project "mention")
* [importing-github-organization](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-github-organization "mention")
* [importing-bitbucket-workspace](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-bitbucket-workspace "mention")
* [importing-gitlab-group](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-gitlab-group "mention")
* [importing-azure-devops-organization](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-azure-devops-organization "mention")
