Skip to Content
Technical Articles
Author's profile photo Former Member

Utilizing GitHub for Easy Code Share

Introduction

While using the Git Repositories available on SAP Cloud Platform, one of the limitations often faced would be to share the credentials of First Developer when another(Second Developer) want to clone the repositories or want to push the changes.

While this is not very obstructive, if being shared, the Second Developer would have full access on the First Developers SCP services/account.

The pop up for Authentication appears as below:-

Fig. 1: Authentication popup appearing for Second Developer while trying to access the repository created by First Developer.

GitHub to the rescue

Assuming that we are using the public repositories from GitHub, let us try to overcome the Authentication issues by using a GitHub Repo.

Detailed step by step explanation of GitHub use is available on the below blog from Raz Korn.

https://blogs.sap.com/2015/11/19/want-to-use-github-as-you-project-repository-with-sap-web-ide/

First we create a GitHub Repository and copy the clone URL.

Fig. 2: Public GitHub Repo.

UI5 App

Login as first developer then create a running app.

Fig. 3: UI5 App at First Developer side in Web IDE.

Git Operations

Set the remote repository as the above GitHub Repository.

Fig. 4: Setting the Remote Repository.

Then we commit and push the app to GitHub Repository(as First Developer).

Fig. 5: Pushing to remote repository.

@ Second Developer

Cloning the GitHub Repository

Fig. 6: Cloning the GitHub Repo.

No Authentications involved as it was a public GitHub Repository, the project is available for modification.

Fig. 7: Application available for Second Developer to use/modify.

Make changes and push the changes to the GitHub Repository.

While pushing the changes, you would have to provide the credentials however(this would be fine while using a corporate repository to be shared among the team).

Fig. 8: Pushing changes as second developer.

Back to First Developer

Changes fetched as First Developer

Fig. 9: Fetching changes at the First Developer side.

The results updated after a Rebase.

Fig. 10: Modified results incorporating Second Developer modifications.

 

Conclusion

While we were not able to completely avoid the Authentication, we were able to bypass the same while cloning a repository as another developer.

Git Repo:https://github.com/jakes2255/SapWebIdeGitShare

 

Thank you,

Jakes

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Good news on private repositories:-

      https://techcrunch.com/2019/01/07/github-free-users-now-get-unlimited-private-repositories/