Connect Custom Git Repository
Select Namespaces in the header navigation, then select the namespace you need.
In the sidebar namespace menu, select Repositories.
On the repository page, click Connect repository.
Specify the following:
Name
Give your repository a distinctive name and optional description. The name may not necessarily match your remote source repository name.
Remote repository URL
Specify the URL of the target remote repository. Note that the URL is different depending on the access type: HTTPS or SSH. For example,
git@my-git-hosting:user/repo.git
orhttps://my-git-hosting/user/repo.git
.Repository web URL
(Optional) Specify the URL of a related web page, for example, this can be the project's web page or the project's
README
. If specified, CodeCanvas will display a link to the remote repository in the repository list.Authentication
Anonymous – the remote repository is publicly available and requires no access credentials.
SSH – the remote repository is accessible via SSH. You need to have an SSH key pair (private and public) generated and stored on your local machine in the
.ssh\
subdirectory. Provide the Private SSH key to CodeCanvas by uploading it to the corresponding field and enter the Passphrase if your key is protected by one. Note that the public key must be registered in the remote repository.If you turn on the Auto-generate SSH keys option, CodeCanvas will generate a new SSH key pair for you. The private key will be uploaded to CodeCanvas automatically, and the public key will be displayed so you can register it in the remote repository.
Password – the remote repository is accessible via HTTPS. Provide your Username and Password (this can be a plain text password or a personal access token).
(Advanced) Read restrictions
In CodeCanvas, access to a dev environment is defined by the Access setting of a dev environment template. If a user is in the Access list, they can create a dev environment from the template and view the repository contents. This is true even if the user doesn't have access to the repository on the Git server (as CodeCanvas uses its own authentication to clone the repository).
The Read restrictions setting lets you prevent such unauthorized access by specifying users who're allowed to read the repository contents. The users out of this list won't be able to create a dev environment even if they have access to the corresponding dev environment template.
Only selected users – explicitly specify users who will have read access to the repository via their dev environments.
All users – all CodeCanvas users will have read access to the repository via their dev environments.
Click Create.