zoukankan      html  css  js  c++  java
  • Eclipse导入github报错

    1. 报错:cannot open git-upload-pack

       第一次通过eclipse导入github 项目,按照百度步骤进行操作,发现不能连接 github,cannot open git-upload-pack。

    2. 报错原因
      通过 eclipse 日志排查报错
      !MESSAGE https://github.com/making/spring-boot-jersey-blank.git: cannot open git-upload-pack
      !STACK 0
      org.eclipse.jgit.api.errors.TransportException: https://github.com/making/spring-boot-jersey-blank.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://github.com/making/spring-boot-jersey-blank.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: javax.net.ssl.SSLException: Received fatal alert: protocol_version
          at sun.security.ssl.Alerts.getSSLException(Unknown Source)
          at sun.security.ssl.Alerts.getSSLException(Unknown Source)
          at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
          at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
          at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
          at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
          at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
          at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
          at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(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)
          at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:167)
          at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:462)
          ... 5 more

      重点在于 : javax.net.ssl.SSLException: Received fatal alert: protocol_version , ssl 协议版本存在问题。
      在 github 的 
      Weak cryptographic standards removal notice 中有提到,取消 TLSv1/TLSv1.1 的连接方式,对于jdk1.7 的用户可以显示的进行配置,对于jdk1.6 的客户建议升级jdk版本,jdk1.8及以上版本支出 TLSV1.2,故不用配置。

    3. 解决方法
      我本地是1.7 需要进行相关的配置操作。
      操作: 在 eclipse.ini 文件的最后加上 -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2(另起一行)

     

     

  • 相关阅读:
    给asterisk写app供CLI调用
    C++实现raw_input
    CentOS6下配置本地用户访问vsftpd,并赋予写权限
    用SqlServer存储Asterisk的呼叫记录
    go 1发布了,之前写的代码不能运行了
    字符串分割(C++)
    asterisk事件监控
    git的简单使用
    用Python访问SqlServer
    像Python那样跑go1的代码(Windows下双击运行)
  • 原文地址:https://www.cnblogs.com/zz-1q/p/10323095.html
Copyright © 2011-2022 走看看