【问题标题】:Eclipse can't connect to Git remote repository with "not authorized" messageEclipse 无法使用“未授权”消息连接到 Git 远程存储库
【发布时间】:2018-07-11 18:51:51
【问题描述】:

我正在使用 egit 插件,而我正在尝试做团队 -> 为 Ecpise 中的一个 java 项目拉取,已经从远程 Git 存储库导入,我在输入我的凭据后收到以下错误堆栈 strace :

org.eclipse.jgit.api.errors.TransportException: http://server:8080/tfs/project: not authorized
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:250)
    at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:293)
    at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:200)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:232)
    at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:176)
    at org.eclipse.egit.ui.internal.pull.PullOperationUI.access$0(PullOperationUI.java:168)
    at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.runInWorkspace(PullOperationUI.java:141)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.eclipse.jgit.errors.TransportException: http://server:8080/tfs/project: not authorized
    at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:531)
    at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:341)
    at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:137)
    at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:123)
    at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1236)
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:239)
    ... 10 more

这是我的会话数据:

java.version=1.8.0_151
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
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    

什么可能导致这个问题?我已经搜索过了,但没有找到明确的解决方案

【问题讨论】:

  • 对这个问题投反对票的人,你能说一下为什么吗?
  • 您是否使用 Egit 克隆了存储库?您的帐户是否可能由于尝试失败而被阻止?尝试使用其他工具克隆 repo 以验证您的凭据是否仍然有效。另外,请检查this以防万一。
  • 您的 TFS 服务器上的身份验证类型是什么?

标签: eclipse git tfs egit


【解决方案1】:

转到您的 github 帐户并创建一个新的个人访问令牌(设置/开发人员设置)并在验证对话框输入用户名和密码时使用它。 提供令牌代替密码。 你的推动会发生。 在此之前,也为您的 github 帐户启用 2 因素身份验证。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-11-11
    • 2019-06-21
    • 1970-01-01
    • 1970-01-01
    • 2013-04-13
    • 1970-01-01
    • 2018-06-24
    • 2010-10-25
    相关资源
    最近更新 更多