{{announcement.body}}
{{announcement.title}}

Configuring Git on Oracle Data Science Cloud Service

DZone 's Guide to

Configuring Git on Oracle Data Science Cloud Service

In this article, we will establish a connection between Oracle Data Science Cloud Service and our remote Git repository.

· DevOps Zone ·
Free Resource

Hello to everyone!

In this article, we will establish a connection between Oracle Data Science Cloud Service and our remote Git repository. We will then send the code to our remote repository via the Data Science Cloud service. I hope it will be a useful article in terms of awareness.

Many Python libraries are available in Oracle's Data Science Cloud service. We can easily install libraries that are not installed from the terminal interface. Git is one example of software already installed in Oracle Data Science Cloud Service. You can open the terminal screen and check this setup with the command below.

Shell
 




xxxxxxxxxx
1


 
1
conda list



Conda list command output

Conda list command output
Yes, as you can see, it is ready to use Git in our service. Now, let's look at how to connect our remote repository. I will use  my own Github account  for this.

Now, I want to go to the /blockstorage directory and create the directory where I will clone my remote repository. At this point, I would like to remind you of the following information. When you stop the operation of your notebook (deactivation process via screens) in Oracle Data Science Cloud Service, you should definitely move the work that you do not want to be lost into the /blockstorage directory.

Otherwise, you may encounter a situation where your work is deleted. For this reason, I suggest you do your work under the blockstorage directory.

Now, let's create a directory where we will hold the warehouse. Then, we'll do our repository configurations.
Shell


Yes, we have cloned our remote Git repository. When we look inside the GitRepo directory we created in the /blockstorage directory, we will see that our entire repository has been copied.

Shell


We saw that our codebase folder is coming. In this folder, we can access the code whenever we want, open and change it, and send it to our remote repository. Now, let's create a new file in the GitRepo directory, where I created a copy of our repository, and send it to our remote repository.

I will put my new file under the /home/datascience/block_storage/GitRepo/codebase/oracle/oml directory in my repository. Then, I will send it to the remote server from here. So let's start doing our operations.

Shell


First of all, we wrote a simple text and created our cloudtest.dat file and committed this file to our local Git repository. Now, we have to push our remote Git repository. To do this, we will need to authorize a remote Git repository using our credentials on the screen. When the information is verified, our code will be sent to the remote server.

Shell


Pushing commits

Pushing commits

Yes, we have committed the newly created file in our local to the remote repo. Now, we can check if the file is going from the GitHub interface.

As we have seen, we have been able to send code very easily to our remote Git repository via Oracle Data Science Cloud Service.

Topics:
cloud, data science, devops, git, oracle, oracle cloud

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}