如何在Eclipse下处理“https://gxxxx.com/xxxxx/xxxx.git:无法打开git-upload-pack”?

时间:2017-06-23 09:29:49

标签: git github

我无法使用eclipse克隆Git存储库。我得到以下错误:

  

https://gxxxx.com/xxxxx/xxxx.git:无法打开git-upload-pack“

堆栈追踪:

org.eclipse.jgit.api.errors.TransportException: https://gitlab.com/induction/trainingplan.git: cannot open git-upload-pack
    at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:196)
    at org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:99)
    at org.eclipse.egit.ui.internal.clone.SourceBranchPage$8.run(SourceBranchPage.java:324)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.jgit.errors.TransportException: https://gitlab.com/induction/trainingplan.git: cannot open git-upload-pack
    at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:499)
    at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:308)
    at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:175)
    ... 3 more
Caused by: java.net.UnknownHostException: gitlab.com
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown 

    Source)

可以采取哪些措施来治愈这种情况?

1 个答案:

答案 0 :(得分:3)

实际原因隐藏在后面:

  

引起:java.net.UnknownHostException:gitlab.com

这告诉您,在您尝试解析gitlab.com的DNS或您的本地Internet(网关或DNS服务器)配置错误/无法正常工作时,您已脱机。

重新连接到Internet(或检查代理设置),然后再次尝试检出所需的git存储库。

希望它有所帮助。