在 Eclipse 上克隆 Git 存储库(传输错误)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29807277/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 10:56:10  来源:igfitidea点击:

Cloning the Git Repository on Eclipse (Transport Error)

gitgithubibm-clouddevops

提问by samet

I am new in Bluemix services. I could not find an exact solution to this problem.

我是 Bluemix 服务的新手。我找不到这个问题的确切解决方案。

I have a web application on Bluemix and a Git repository on DevOps. I'm working on Eclipse (have Git and Bluemix plugins) and made some changes on the project. Now, I have the last version of the project in Local and Bluemix side and need to update the repository (which is still starter code).

我在 Bluemix 上有一个 Web 应用程序,在 DevOps 上有一个 Git 存储库。我正在 Eclipse 上工作(有 Git 和 Bluemix 插件)并对项目进行了一些更改。现在,我在 Local 和 Bluemix 端拥有项目的最后一个版本,需要更新存储库(它仍然是入门代码)。

As a first step, I am trying to clone the Git repository (on Eclipse). After I fill the URI and authentication fields, I am getting the error that is shown below. I can pass over SSL error by setting http.sslVerify=falsebut cannot solve the others. Thanks.

作为第一步,我尝试克隆 Git 存储库(在 Eclipse 上)。填写 URI 和身份验证字段后,出现如下所示的错误。我可以通过设置传递 SSL 错误,http.sslVerify=false但无法解决其他错误。谢谢。

Trasport Error

传输错误

Error Log:

错误日志:

eclipse.buildId=4.4.2.M20150204-1700
 java.version=1.8.0_45
 java.vendor=Oracle Corporation
 BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=tr_TR
 Framework arguments:  -product org.eclipse.epp.package.jee.product
 Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

 org.eclipse.egit.ui
 Error
 Thu Apr 23 12:46:33 EEST 2015
 https://hub.jazz.net/git/***/***: authentication not supported

 org.eclipse.jgit.api.errors.TransportException: https://hub.jazz.net/git/***/***: authentication not supported
     at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:223)
     at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:159)
     at org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:99)
     at org.eclipse.egit.ui.internal.clone.SourceBranchPage.run(SourceBranchPage.java:324)
     at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
 Caused by: org.eclipse.jgit.errors.TransportException: https://hub.jazz.net/git/***/***: authentication not supported
     at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:494)
     at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:309)
     at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:202)
     ... 4 more

NOTE:After looking the error log, I think it is an authentication based problem. But I am using the same email and password that I use for logging in to Bluemix. By the way,I tried it on Git command line. It is successfully cloned, commited, and pushed. And I do not understand why this problem happens in Eclipse.

注意:查看错误日志后,我认为这是一个基于身份验证的问题。但我使用的电子邮件和密码与登录 Bluemix 时使用的电子邮件和密码相同。顺便说一下,我在 Git 命令行上尝试过。它已成功克隆、提交和推送。我不明白为什么在 Eclipse 中会发生这个问题。

回答by VishalS

Check in Git profile if you have made two factor authentication as ON. Because in that case when you connect from browser then it'll authenticate properly and connect but when you do it from eclipse it only checks normal credentials(username,password) and fails to authenticate.

如果您已将两因素身份验证设为 ON,请检查 Git 配置文件。因为在这种情况下,当您从浏览器连接时,它会正确进行身份验证并进行连接,但是当您从 eclipse 进行时,它只检查普通凭据(用户名、密码)并且无法进行身份验证。

回答by christo4ferris

I just tested this from end-to-end and had no problems. Possibly it was transient? Can you try again, please?

我刚刚从头到尾测试了这个,没有任何问题。可能是短暂的?请你再试一次好吗?

Here are the steps I took to reproduce:

以下是我重现的步骤:

File/Import...
Select dialog
* Git/Projects from Git
* click next

Select Repository Source dialog
* Clone URI
* click next

Source Git Repository dialog
* from Settings page (e.g. https://hub.jazz.net/project/you/yourproject/settings/general)
* copy the Git URL e.g. https://hub.jazz.net/git/you/yourproject
(Host and Repository Path should populate)
* populate User and Password with your IBM ID
* click next

Branch Selection dialog
* (master should be selected)
* click next

Local Destination dialog
* select a local destination
* click next

Select a wizard to use for importing projects dialog
* (Import existing projects should be selected)
* click finish

et voila!

等等!

If the Git URL is incorrectly entered, then the Select Branch dialog will respond with the error dialog described in the original question.

如果 Git URL 输入错误,则“选择分支”对话框将使用原始问题中描述的错误对话框进行响应。

回答by Aj_Mack

I was also facing the exact same problem of : "incorrect URL, or incorrect passwrd and SSL not verified". I googled that and was asked to change in the .git config file and update the parameter to: "sslVerify=false", but that didn't work. After more searching I updated the git plugin for eclipse to the latest version and it worked. Please do check by updating if there are updates available to the git plugin, install them and then it should work.

我也面临着完全相同的问题:“不正确的 URL,或不正确的密码和 SSL 未验证”。我用谷歌搜索并被要求更改 .git 配置文件并将参数更新为:“sslVerify=false”,但这不起作用。经过更多的搜索,我将 eclipse 的 git 插件更新到了最新版本,并且成功了。请通过更新来检查 git 插件是否有可用的更新,安装它们然后它应该可以工作。

回答by Evandro Brunassi

I had this problem before.

我以前遇到过这个问题。

Select the option 'Clone Git Repository', the problem was solved when I pasted the URL as HTTP protocol, and changed the 'Connection Protocol' to Git:

选择'Clone Git Repository'选项,当我将URL粘贴为HTTP协议并将'连接协议'更改为Git时,问题解决了:

Before: http://github.com/My_Account/My_Repository.git

之前:http: //github.com/My_Account/My_Repository.git

After: git://github.com/My_Account/My_Repository.git

之后:git://github.com/My_Account/My_Repository.git

Then try to run.

然后尝试运行。

回答by Vikky

I believe Eclipse Mars has some issue with GIT plugin. I was using Eclipse Mars and facing the same issue. I installed Eclipse Oxygen and it worked without any issues. So before you dig further into it, just try with Eclipse Oxygen.

我相信 Eclipse Mars 对 GIT 插件有一些问题。我正在使用 Eclipse Mars 并面临同样的问题。我安装了 Eclipse Oxygen,它没有任何问题。因此,在进一步深入研究之前,请尝试使用 Eclipse Oxygen。