With no projects opened, Git > Clone Repository is the only Git operation available.
You can clone a remote repository by entering the project repository URI (GitHub, OpenShift, Springloops, etc.).
Codenvy will let you choose the project type:
If the cloning operation is successful, you’ll see a confirmation message.
If you are using SSH connection to clone your repository, you’ll have to establish a secure connection between Codenvy and your Git service provider.
To do so, generate SSH keys and add the public key to your service provider:
- go to Window > Preferences > SSH keys
- click on Generate key
- enter host name without port (http or www) and click OK
- click View and copy the key to clipboard
- save this key to your account of the Git service you are using.
For GitHub, you can use button in the bottom right corner to automatically generate SSH key and save it to your GitHub account.
For GitHub, refer to Step 4 of the documentation https://help.github.com/articles/generating-ssh-keys
Even after failed attempts to clone a repository, Codenvy nonetheless creates a folder with the repository’s name in the workspace, so next time you try to clone the same repository, Folder exists error might show up unless you enter a different folder/project name. To fix this error, delete the existing folder from your Workspace. Go to Window > Show View > Navigator to open a Workspace tab on the left. Find the repository that causes error and delete it.
Command line equivalent:
git clone <repository url>
git clone firstname.lastname@example.org:agile-earth-9926.git
Initialize Local Repository
After creating a new project, you can start working with Git by initializing a local repository. All other Git commands remain grayed out until the project is initialized.
Initialize your repository by clicking Git > Initialize repository. This will have the same behavior as the following command-line:
Confirm the Work directory and you will see a confirmation message in the Output panel.
Now your project is ready for Git operations like adding files, committing changes, creating branches, merging and working with remote repositories.
Delete Local Repository
If you want to delete your local Git repository, go to Git > Delete Repository and confirm deletion of a Git repository.