Introduction

From time to time, I get asked the question “Can I use an external Git with SAP Web IDE?”

When working with SAP Web IDE I recommend using the integrated SAP HCP Git (Look in the Summary section for some of the reasons).

However, SAP Web IDE enables the use of an external Git as well.

As Lidor Tal mentions in his excellent blog post How to Use the SAP Web IDE Git Client, the first thing you have to do to work with Git, is to have a Git repository in your SAP Web IDE workspace”. However, the examples in Lidor’s blog post, use the SAP HCP Git server that is well integrated with SAP Web IDE.

This blog post describes how to use GitHub as an external Git as the project repository with SAP Web IDE. It is part of a series of blogs that discuss Git and SAP Web IDE.

  • It is NOT intended to teach Git. For this there are plenty of resources on the web, specifically with most Git services, you’ll find an education section.
  • It is NOT intended to educate on SAP Web IDE Git client functionality.

I plan a series of related blogs that will describe how to use additional Git services, such as BitBucket, as Git repositories for a SAP Web IDE project as well as relevant tips & tricks.


2015-12-13 Update: Want to use Bitbucket as your Project Repository with SAP Web IDE?

Overview

In this blog I will discuss:

  • Creating the repository
  • Cloning the repository

Creating the Git Repository

When working with external Git repositories, and with GitHub specifically, the first step is to create the repository. This step is probably the only thing that is substantially different from working with the SAP HCP Git. The reason for this is that when working with external Git, the Git repository creation is done through the Git service, while with the SAP HCP Git when creating an HTML5 application in the HCP cockpit or when deploying to HCP from the SAP Web IDE, it is automatically created for you.

Steps to create the Git repository on GitHub:

  • Login to your GitHub account.
  • Create a new repository.

GitHub-Create Repo-4_.png

  • Fill in the repository fields, mainly Repository name, description, public/private, etc.

Important: Don’t forget to check the “Initialize this repository with a README”.

GitHub-Create Repo-5_.png

Cloning the Git Repository

Steps to clone the Git repository from GitHub:

  • In your GitHub account, select the repository to clone and copy the repository link.

GitHub-Clone Repo-1_.png

  • In SAP Web IDE, choose the “Clone Repository” option.

GitHub-Clone Repo-3_.png

  • In the URL field of the popup, paste the GitHub repository link and push <Tab> button.

Note: The “Host” and “Repository Path” fields are filled-in automatically.

GitHub-Clone Repo-5_.png

  • Fill-in the authentication fields. You’re welcome to check the “Remember Me” checkbox for next times.


  • After clicking “OK” you’ll get notifications both in the console pane as well as in the “Highlighted Announcement Area” of the SAP Web IDE. You will see them at the beginning of the clone operation as well as at the completion.

GitHub-Clone Repo-6_.png

Congrats !!!

A new project was generated in SAP Web IDE that was cloned from GitHub. You can see that, as expected, the project only contains the README.md file.

Open the Git History pane. You’ll see that it contains one commit, the initial commit. If you click on the commit, you’ll see that it only contains one file, README.md that was added to the repository (Status – A).

GitHub-Clone Repo-8_.png

Summary & Next Steps

Cloning from an external Git repository is simple, specifically with GitHub.

The major difference from the SAP HCP Git is:

  • You need to create the Git repository in GitHub prior to the start of development.
  • You need to check the “Initialize this repository with a README” checkbox during creation of the repository.


OK, now that the project is cloned in SAP Web IDE, what can I do next?

Following are a few options:

  • Import a project.
  • Create a project from template.


A few things to note when working with external Git

  • You cannot deploy from SAP Web IDE to HCP.
  • Creation of branches, and possibly additional repostiroy management operations, should be done via the Git service UI / client.

— Raz

To report this post you need to login first.

12 Comments

You must be Logged on to comment or reply to a post.

      1. Gregor Wolf

        Dear Raz,

         

        support for onPremise Git repositories would be very appreciated. As the SAP Cloud Connector already supports HTTP(S) it shouldn’t be so hard to access a Git repository on premise that is exposed via the Cloud Connector.

         

        Best regards

        Gregor

        (0) 
      2. Vikrant Raj

        Hello Raz,

         

        I checked details of all latest releases of WebIDE till August 2016 but there are no updates on on-premise Git support. Is it available now? If not, when is it planned?

         

        Regards,

        Vikrant

        (0) 
        1. Raz Korn Post author

          Hello Vikrant,

           

          I have no updates to share on supporting on-premise Git. It has not been released and we plan to support it. I cannot share the expected timeline.

           

          Regards,

          Raz

          (0) 
          1. Lokesh Kamana

            Hi Raz,

            Does SAP Support connecting on-Premise git in the current web IDE. In case of any support issues which is the component that handles these requests?

            Regards,

            Lokesh.

            (0) 
      1. Helmut Tammen

        Thank you Gregor for your suggestion. You’re right that should also work with an OnPremise Repository.

        Nevertheless it would be more comfortable to connect the Web IDE directly to the OnPremise Git via CloudConnector and a destination in HCP cockpit.

         

        Thx again and regards

        Helmut

        (0) 
  1. Daniel BD Nguyen

    Hi, on a side note, I’m interested to know is if there’s a possibility to use cli (command line) git with SAP web ide instead of this nice but limited GUI options they provide.

    (0) 
  2. Francisco Marquez

    Thanks for the article, it seems rather straightforward.

    IS there any additional configuration required for cloning repositories from github, or gitlab to SAP HANA 2 Express webide? IT does not seem to work, with every attempt throwing the error “cannot open git-upload-pack”…

    Thanks again

     

    (0) 
  3. Francisco Marquez

     

    Hi, I managed to find out my issue. Probable it is happening to others.

    The VM installation is configured to use a dynamic IP address, that will work just fine. However, I set a static one, and it seems that SLES is not automatically using the default gateway to route DNS queries, resulting in failing name resolution out of my network. Once that was solved (using yast to add the gateway as a DNS), git could clone from GitHub with no issues. I trust this will help others that use this configuration.

    Thanks

    (1) 

Leave a Reply