- Oracle JET Routing - 22. November 2018
- Using Vagrant and Docker for APEX Development – a DOAG story - 21. November 2018
- Social Sign-In in Oracle APEX for Microsoft Azure - 4. November 2018
If you are new to Oracle Cloud and you would like to start with the basics then you are in the right place. This small tutorial shows how to do a simple checkout from a GIT repository created by Oracle Developer Cloud Service, when you create a new project in Oracle Cloud. At first it seems this is a bit of a hustle, but you will see that this is all normal in the world of programming.
After creating your Oracle Cloud Free Trial account, you will get an email from Oracle to your cloud services dashboard:
I’ve authenticated with my oracle user and password. Then I could see my free trial dashboard and I’ve decided to create a new project.
After some tweaking around I’ve realized that I must reset the password for my Oracle Cloud and the SFTP password in case that later I will create an Oracle Database Cloud Connection with SQL Developer. But before that, take note of the Data Center where the Developer service is running:
With this information in my mind, I’ve clicked on the menu bellow my user name and selected My Services:
I had to select the Data center assigned to me:
Here you have to select your Data Center and click on the “My Services” blue button.
Click on GO after making sure you have the right Identity Domain.
Provide the user and password provided by Oracle via email after registering for the Trial:
After this Oracle Cloud will ask you for a new password and some personal questions, please enter the information and make sure you provide a strong password. Then you will see a dashboard like:
Here you have another menu for your user where you need to go to set the SFTP password and the SSH keys for the GIT handshake, in order to use a local GIT tool for committing to Oracle Cloud, which is the recommended way. Now for the next step go to My Profile:
Go to the SFTP tab:
Right click on the menu for each SFTP user and reset their password:
Now the next step would be to create a new project and get it locally with GIT. First we need to generate a SSH key, which has a private key phrase, then add the public key in Oracle Cloud and use the private key by your local tool, e.g. Eclipse, JDeveloper, NetBeans, etc.
SSH keys are used to configure and connect to a project’s GIT repository using a SSH tunnel. You can associate a SSH key with your account from your account preferences page. Note that only RSA keys are accepted as SSH keys.
To generate and add a SSH key:
- Open a Git prompt, like Git Bash (see what version is best for your environment):
- Enter the following command:
ssh-keygen -t rsa
3. Enter a file name for the key and press Enter, e.g. /d/oracle_cloud_rsa
4. Enter a passphrase and press Enter. Remember this passphrase.
Now you have two files:
- oracle_cloud_rsa.pub -> this contains the public key, which you need to add it to the Oracle Cloud;
- oracle_cloud_rsa -> this contains the private key that you need to later add to your local tool;
The private key, oracle_cloud_rsa, must be added to Eclipse, so go to Eclipse menu Window->Preferences, under the section General/Network Connection/SSH2 add the file to the Private keys:
Make sure the SSH2 home points to the folder where the private key file is stored.
Ok, let’s add the public GIT key in Oracle Cloud. You can add the SSH key in the Authentication tab of the Preferences page. To accesss the Preferences page you have to go to the Dashboard:
Click on the menu for the Developer service and select Open Service Console:
You will have the following screen, where by clicking on the user, you will see the Preference menu:
Now you will see the Authentication left tab where you can add your public key generated before:
Click on Add Key and enter the name and the public key from the file oracle_cloud_rsa.pub, make sure you don’t add an extra new line at the end. After that click on Done and you are finished.
It’s time to create our new project and check it out using Eclipse, so go back to the Service Console view and click on New Project:
Enter the required information, and click next:
Select the simple Java SE Sample Deployment project:
Select the Wiki Markup you like and click on Finish:
Now Oracle Cloud works for you to create all the services for your project, like Git repository, Maven, Issues, etc.
You will be redirected to the project console, where you have access to lots of cool stuff, but I’m interested in getting the code out from Oracle Cloud and to have it locally where I can develop, so I go to the Code tab in the left menu:
Here I click on the SSH button:
And I copy the provided URL, which I will use in Eclipse:
Please don’t enter the password, as at the next step Eclipse will require the secret passphrase you entered when creating the keys, so click Next:
Click Next, then Finish.
Now if you create a local branch and publish it to the Oracle Cloud you will see a new item in the Activity dashboard of the Oracle Project Console page: