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

d4so4syb  于 2022-10-15  发布在  Eclipse
关注(0)|答案(2)|浏览(188)

我正试图在我的服务器上使用Git,但我无法使用它。当我尝试将项目推送到服务器时出现错误。以下是错误所在。

错误信息

推送URI ssh://emre@88.247.25.9:7358/C:/Android存储库时出现异常:无效的数据包行标题: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。

fdbelqdn

fdbelqdn1#

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

git remote set-url origin <new_url>
t9eec4r0

t9eec4r02#

在我的例子中,问题是用户没有外壳访问权限。

相关问题