Skip to Content
1

Cloning HCP Git respository in Web IDE

Oct 11, 2016 at 02:14 PM

239

avatar image

I have developed an HTML5 application which is deployed on HCP. I developed the app from a Fiori template using Web IDE. I can see that a repository was created in the HCP Git for my application and it has a version for each of my deployment versions. I can browse the individual files in the repository browser.

Now I have a 2nd developer in the team and we need to be able to work on each other's code. As a first step we are trying to clone the repository of this existing app. There are many different ways to do this but whichever way we try it doesn't work. We have tried in Chome, in IE and in Firefox. The cloned project is always empty.

I would really appreciate some help as we would love to make use of the Git functionality which has been provided with HCP and the functionality should be sufficient for our needs.

The following describes one such attempt in detail, using Chrome.

1) In the HCP cockpit I navigate to Repositories-> Git Repositories

2) I click on the repository name

3) I click the Web IDE button. I get a pre-populated dialog like this in Web IDE

4) I complete my S-account credentials under Authentication and click OK

5) At the next dialog I click Commit and Push. Note the error in the Web IDE console: Path parameter was not found

1:02:56 PM (External Command) Executing cloneandopen command 1:04:33 PM (git) Clone request sent 1:04:39 PM (git) Clone request completed successfully 1:04:39 PM (CloneAndOpen) Clone repository https://git.ap1.hana.ondemand.com/ca06eb766/rhlstockcount finished successfully 1:04:39 PM (CloneAndOpen) Path parameter was not found 1:04:39 PM (External Command) Command cloneandopen has finished executing 1:04:40 PM (git) Stage File request sent 1:04:40 PM (git) Stage File request completed successfully

6) The dialog closes and the following entries are added to the console

1:06:57 PM (git) Commit request sent 1:06:57 PM (git) Commit request completed successfully 1:06:58 PM (git) Push request sent 1:07:02 PM (git) Push request completed successfully

7) In the Git pane I click Fetch. A dialog appears. There are no updates shown.

8) I click OK. The console shows the following new entries

1:10:24 PM (git) Fetch request sent 1:10:29 PM (git) Fetch request completed 1:10:33 PM (git) Log request completed

9) Now I click Rebase in the Git pane. I click ok on the popup

10) The following entries have been added to the console

1:14:01 PM (git) Rebase request sent 1:14:01 PM (git) Rebase request completed successfully

11) The new project is empty

12) For reference my email address and user mdoyle are set in the Git settings in Web IDE

And here are my HCP roles under Members

Administrator, Developer

I'm using Chrome version 53.0.2785.143. The console output is attached webidegitcloneconsole.txt

icxw3.png (20.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Michal Keidar
Oct 12, 2016 at 02:12 PM
3

Hi Mike,

When you developed your app in Web IDE, was it connected to a Git repository?

When deploying the app to HCP, it is true that a Git repository is created for it, but it isn't connected to the app.

The deployment feature in Web IDE is not related to Git anymore. It simply creates a new version and deploys the app to HCP, it doesn't commit and push the code to the repository.

The proper way of working is:

1. Create an application from a template
2. Create a Git repository in HCP
3. Connect the app to the Git repository using "Initialize Local Repository" command in Web IDE
4. Develop the app, commit and push the code
5. When development is done - deploy the app with a new version
6. When another developer needs to develop this app, he clones the Git repository to his Web IDE and commits and pushes his code.

Here are some links that may be useful:
1. https://blogs.sap.com/2016/04/21/sap-web-ide-deployment-to-sap-hana-cloud-platform-explained/
2. https://blogs.sap.com/2016/06/01/git-basics-in-sap-web-ide/

Regards,
Michal.

Share
10 |10000 characters needed characters left characters exceeded
Mike Doyle Oct 14, 2016 at 01:01 AM
1

I've worked out how to do this.

1) Export your code from Web IDE (to File System)

2) Go to HTML5 Applications in the HCP Cockpit

3) Select the HTML5 application and go to Versioning. Under the Source Location section Click Edit Online. This opens Web IDE and creates a new project in your workspace. Because there won't have been a commit of all your changes the folder will be empty (except for a .gitignore file).

4) In Web IDE import your folders and files from the file system

5) In the Git pane do a 'Commit and Push'. Now you will see your commit in the GIT repository. Your most recent commit adds all of your files and folders

6) Now your buddy can clone your repository and make changes to the application

Share
10 |10000 characters needed characters left characters exceeded