Eclipse Git(EGit)Remote:无效的数据包行标题

时间:2014-02-24 21:55:05

标签: eclipse git ssh egit

我正在尝试在我的服务器上使用Git,但我无法使用它。当我尝试将项目推送到服务器时,我收到错误。这是错误。

错误消息

  

推送URI期间发生异常   ssh://Emre@88.247.25.9:7358 / C:/ Android Repository:无效的数据包行   标题:Unab

异常堆栈跟踪

org.eclipse.jgit.errors.TransportException: Invalid packet line
 header: Unab   at
 org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefs(BasePackConnection.java:182)
    at
 org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:327)
    at
 org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:152)
    at
 org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:154)
    at org.eclipse.jgit.transport.Transport.push(Transport.java:1173)   at
 org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:190)     at
 org.eclipse.egit.ui.internal.push.ConfirmationPage$2.run(ConfirmationPage.java:206)
    at
 org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
 Caused by: java.io.IOException: Invalid packet line header: Unab   at
 org.eclipse.jgit.transport.PacketLineIn.readLength(PacketLineIn.java:193)
    at
 org.eclipse.jgit.transport.PacketLineIn.readString(PacketLineIn.java:138)
    at
 org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefsImpl(BasePackConnection.java:195)
    at
 org.eclipse.jgit.transport.BasePackConnection.readAdvertisedRefs(BasePackConnection.java:176)
    ... 7 more

我的ssh URI是否正确?

ssh://Emre@88.247.25.9:7358/C:/Android Repository

Emre是我的用户名。我正在使用7358端口。我的项目位置是服务器中的C:/ Android Repository。

1 个答案:

答案 0 :(得分:1)

我认为您的ssh网址无效。使用此命令设置远程URL。

git remote set-url origin <new_url>