cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HANA Express - Web IDE - Git clone error - cannot open git-upload-pack

Former Member
9,746

Hi,

I'm following OpenSAP development course manual for HANA 2.0 and folloow the exercises.

When in Web IDE, I go to File > Git > Clone repository and input the url of the template files for the course, which is: https://github.com/SAP/com.sap.openSAP.hana5.example

After clicking Ok, I'm getting an error:

Clone request failed

https://github.com/SAP/com.sap.openSAP.hana5.example: cannot open git-upload-pack

Can anyone direct me towards a correct solution? The course itself is already over, so I can't ask there. Thomas Jung (one of the teachers) mentions that I can just import it as a .zip file from Github, but I want to have a fully working connection to repository.
Thanks 

Accepted Solutions (0)

Answers (13)

Answers (13)

former_member703978
Discoverer

Hi colleagues,

To fix the issue you need to generate and save locally a token in Git settings for your user: https://github.wdf.sap.corp/settings/tokens

After that in WebIDE you need to choose Use Token Authentication option and paste the token. Please be advised, you will not be able to see the token in future, so please save it locally.

former_member768158
Discoverer
0 Likes

so good. It helped me.

Former Member
0 Likes

HI ,

Is it possible to get Git Repository files and content ? other application ? we need any API support here ?

i will tell you my case:

i have one input files and button . in the input filed i give hcp git url like https://git.hanatrial.ondemand.com/p1xxxxx/fioridemo.

after clicking submit button i need to get the “fioridemo” files and content in table .

i get succeed using github.com to get the user repository files and content by using https://api.github.com/ API file.

is there any API file to get the HCP Git repository ?

please suggest me on this.:)

Regards,
Sam

carlsoane
Advisor
Advisor
0 Likes

You need to customize the proxy server settings in your di-core application, then restage and restart the application. Here is an example for how to do it if your proxy settings are as follows:

https_proxy: myproxy.mycompany.corp:8080

no_proxy: *.mycompany.corp,localhost,127.0.0.1,10.*


#Set the JBP_CONFIG_JAVA_OPTS environment property for the di-core application
#Note the replacement of the comma with the pipe ("|")
xs set-env di-core JBP_CONFIG_JAVA_OPTS '[java_opts: "-Dhttps.proxyHost=myproxy.mycompany.corp -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=\\\"*.mycompany.corp|localhost|127.0.0.1|10.*\\\""]' 

#Restage the application to replace the cached environment variable
xs restage di-core 

#Restart the application to have the JVM start with the new settings
xs restart di-core

Regards,

Carl

former_member25364
Participant

Hello

I am trying the LIVE5 Tutorial and I have the same problem but I do not use any proxy.

any solutions ?

Regards

Emmanuel

Former Member
0 Likes

Hi Carl,

I'm in the same situation as Emmanuel. I'm not using any proxy and facing the same issues as mentioned previously.

SAP WebIDE version: SAP Web IDE for HANA 2 SPS 02 Patch 0 ( Build 4.2.14 )

Any idea?

Kind regards,

Thijs

former_member25364
Participant
0 Likes

Hello

As you do not have a proxy, you have to set the gateway via Yast.

Regards

Emmanuel

Former Member
0 Likes

Hi Emmanuel,

Thank you for your response. Any documentation on how to do that?

Kind regards,

Thijs

Former Member
0 Likes

Hi,

I just wanted to say that it was the DHCP that was configured wrongly. For anyone facing these issues, try to figure out you DO have connection to the web. If not, try to start looking from there.

Thanks for the help,

Kind regards,

Thijs

Former Member
0 Likes

Hi,

in my case it seems to be a problem with the authentication method. If I disable all authentication methods except Basic it works fine. If I enable NTMLv2 for example it fails with the described error.

Maybe this helps someone...

regards

0 Likes

HI @all.

i'm facing the same issue. I have an gitlab with an valid!!! self signed certificate. If I use my gitlab via https without webIDE everything works fine. But when I try to clone a repo it fails with: git-upload-pack permitted.

How can i use my own OnPremise gitlab Server.

btw. The certificate ist signed via letsencrypt. But it should'nt matter? Isn't it?

regards Micha

Former Member
0 Likes

Hi Micha,

since we don't se a full stacktrace we can just guess. But if you are using SAP Web IDE for SAP HANA you should try to add your certificate to the SAP Web IDE SSL Certificate Administrator (di-cert-admin-ui).

regards

0 Likes

Hi Hans,

i'm ussing SAP WEB IDE NOT for SAP Hana ... 😞 Any ideas what i can do here to get this running? I'm able to check, that the port is the problem.. I'm running on a different port like 443 i'm using 776. If I change my git to use 443 its working with SAP Web IDE. But NOT with my 776. What can i do here?

do you know a support adress or something like that?

regards micha

Former Member
0 Likes

Hi Micha,

if you have an so called S-User you can use https://launchpad.support.sap.com/ to open a support ticket.

But maybe it is easier to switch the port to 443...

Greetings

Former Member
0 Likes

Hello Annie,

the error "cannot open git-upload-pack" can be caused by lots of different problems. The error message is more like a symptom not like a cause of the actual error. So it's hard to guess whats the actual error.

In other eclipse environments you get a full stack trace like the following which is much better for analysis

!SUBENTRY 1 org.eclipse.egit.ui 4 0 2015-04-16 15:22:31.304
!MESSAGE https:// username@server/p/sandbox: cannot open git-upload-pack
!STACK 0
org.eclipse.jgit.api.errors.TransportException: https:// username@server/p/sandbox: cannot open git-upload-pack
   at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
   at org.eclipse.egit.core.op.FetchOperation.run(FetchOperation.java:134)
   at org.eclipse.egit.ui.internal.fetch.FetchOperationUI.execute(FetchOperationUI.java:103)
   at org.eclipse.egit.ui.internal.fetch.FetchOperationUI$1.runInWorkspace(FetchOperationUI.java:123)
   at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: https:// username@server/p/sandbox: cannot open git-upload-pack
   at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:521)
   at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309)
   at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
   at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
   at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1111)
   at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
   ... 5 more
Caused by: java.net.SocketException: Unexpected end of file from server
   at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:792)
   at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
   at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:789)
   at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1535)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
   at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
   at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
   at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:98)
   at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:168)
   at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:475)
   ... 10 more

In this example which i just copied from https://www.eclipse.org/forums/index.php/t/1065782/ you see there is a inner exception which describes the error much better.

So the question is how can we get this underlying exception?

If we just try every possible cause we will need a lot of time 🙂

related :https://answers.sap.com/questions/111929/where-are-the-logfiles-of-webide-for-hana.html

Former Member
0 Likes

Hi Kuatroka,

You may have already tried this but in case you haven't - are you on a restricted network? I find that on a restricted network like a VPN or corporate Wi-Fi connection, you may be unable to clone any Git repository. By switching to a secure but unrestricted network (like home internet or coffee shop internet), it might work. Can you let me know if that works for you?

Thanks,

Annie

Former Member
0 Likes

You can also check out this thread: https://answers.sap.com/questions/28743/cloning-hcp-git-respository-in-web-ide.html

This one is in regards to HCP but it might help in case of HANA Express too since we are dealing with the issue of cloning Git repositories in Web IDE.

Former Member
0 Likes

Hi, I'm facing the same issue. Vanilla installation of SAP HANA 2 Express VM, and all steps performed as per the guidelines. Webide working fine, but cloning a GitHub empty (only a README.MD file) results with the error: cannot open git-upload-pack

Is there any additional configuration required? Any certificate import required? As per the tutorials, the cloning should work out of the box...

My VM is hosted on my workstation that is connected to internet without proxies. From the host command line I can clone the same empty GitHub repository, just fine.

Thanks for any insight into this!

Former Member
0 Likes

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

Former Member
0 Likes

Hello Kuatroka,

I'm fighting with the same problem. Have you found any log entries or stack traces regarding this error?

I've searched through all log files, but I wasn't finding any entry...

Greetings

Former Member
0 Likes

Hi Josef, unfortunately no good news for now. I stopped researching about it for now as I don't see anyone from SAP picking this subject up or clarifying anything. The only suggestion I got is to check if the HANA system is behind a firewall or some ports are closed. As I'm not a Linux expert I'm not sure how to do it. Specially given the fact that HANA VM OS is completely command line based.

Let me know if you get through this issue.

Cheers

Former Member
0 Likes

Really. no one can help? Anyone from SAP HANA Express team maybe?

Thanks

Former Member
0 Likes

Sean, what is the workaround did you mean? In the link you added, I see that the tutorial just tells us to follow the usual steps File > Git > Clone Repository and in the tutorial it works, but in my case, I get an error. Maybe I missed the workaround part?

Thanks.

Former Member
0 Likes

I'm getting the same issue too. Have uploaded the github certificate to HANA per the instructions for https access. still getting the 'cannot open git-upload-pack' error when trying to clone from public github repo. Any help would be appreciated!

Former Member
0 Likes

HI, I had the same problem. There seems to be an issue as the "Tinyworld" tutorial has this exercise/workaround

https://blogs.sap.com/2016/03/29/developing-with-xs-advanced-source-control/

Former Member
0 Likes

Any help on this please. Does everyone's Git in HANA Express works ok?