The Integration blog covers the latest in product updates, best practices, customer stories, and more.

  • September 29, 2015

SOACS plus DevCS - Chapter 03

In this series of posts and videos, we will explore creating and deploying a SOA composite using Oracle Developer Cloud Service.

< Previous Chapter | Next Chapter >

Chapter 03 - Creating SSH Keys

Many git operations require a connection to the remote server.  If you use the https repository url, then you will be asked your password each time.  Your password should be strong, which most likely means it is tedious and difficult to type repeatedly.  To avoid this pain (and for other reasons), it is recommended to connect to your repository using public key encryption.

The following commands use Linux bash shell syntax.  If you are a Windows user, then you should use "git bash" or "git shell" as recommended in the following  github guide in which case the commands below should work. 

To start, you must create a public/private key pair:

ssh-keygen -t rsa -N "" -C "My DevCS Key" -f ~/.ssh/id_rsa

If you already have a key called "id.rsa", then you should use a different name.

For this example, I do not specify a passphrase.  A passphrase is a lot like two factor authentication (2FA) in that the key is something you have and the passphrase is something you know.  That way, if someone steals your key (what you have), they still need to steal your password (what you know).  More details can be found here.  Once you start using passphrases, you will have to supply your password each time.  This may sound counter-productive given that I recommended using public key over https for this reason, but you can use tools like ssh-agent to securely store your password on a session by session basis.

The above command will generate two files: "~/.ssh/id_rsa" and "~/.ssh/id_rsa.pub".  The "pub" file is the one you share with DevCS.  The non-"pub" file is a secret that should be known only to computers you trust.

Note that if your DevCS username is your email address (e.g., me@mycompany.com), then DevCS may url encode the '@' symbol.  For example, your repository URL might be:

git clone ssh://me%40mycompany.com@...oraclecloud.com/myproject.git

If you have trouble connecting, you may want to un-encode the '@' symbol using a single or double quote:

git clone ssh://"me@mycompany.com"@...oraclecloud.com/myproject.git

For more information on how to generate ssh keys, please see the following github guide.

While Linux is used in the video series, all mvn and git commands are applicable to Windows.  Any variations will be called out in the accompanying blog.

Helpful links:

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.