Importing Repositories via a URL
This is a quick guide on how to import any git repository into Cosine via a URL.
Note: If your repository is stored in GitHub, then we highly recommend installing the GitHub integration and importing from there (see "Connecting GitHub Repositories"). This will give you a much richer integration, allowing for Pull Requests to be created and managed through the platform, as well as for Cosine to respond to CI workflow runs (see "CI/CD Integration").
Step 1: Head to the New Project page

You should see something like this. Click on the Import from URL tab.
Step 2: Provide Project Details

Fill in this form, providing either an SSH (preferred) or HTTPS URL for cloning the repo. As you provide the URL, the form will detect its type and render one of two different forms accordingly. For HTTPS URLs, you will see:

And you will need to provide a PAT to proceed. For SSH URLs, you will see:

We need a pair of SSH keys to continue. If this is not your first project in the team, and you have already set up team SSH keys to use, you can click to use those. Otherwise, you can generate a fresh pair or paste in your own.
You will then need to add the public key in your Git provider so that the provider knows to allow interactions with this key. To do that, you will need to leave the platform and go to your Git provider. Each provider will have a slightly different flow for adding a key. Below is how you do it in Bitbucket (if you're not using Bitbucket and are unsure, you should be able to find an easy guide for whichever provider you're using with a quick search for "Add user SSH key to [provider]").
Adding your public SSH key in Bitbucket
From the Bitbucket settings, head to your personal Bitbucket settings:

Add an SSH key to this user:

Paste in the public key you set up from Cosine:

You're all set! Head back over to Cosine. Click the box to confirm you have added the key to your provider, and you should now be able to import the project and get cracking with a task!
Last updated
Was this helpful?