2014-02-24 51 views
1

我想在我的服務器上使用Git,但我無法使用它。當我嘗試將項目推送到服務器時出現錯誤。這是錯誤。Eclipse Git(EGit)Remote:無效的數據包行標題

錯誤消息

推過程中發生異常的URI SSH://[email protected]: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://[email protected]:7358/C:/Android Repository

埃姆雷是我的用戶名。我正在使用7358端口。我的項目位置是服務器中的C:/ Android存儲庫。

+0

當您使用具有相同URL的命令行推送時會發生什麼? – robinst

+0

我是git的新手。我不知道如何通過命令行推送。你能給我任何樣品嗎? –

回答

1

我認爲你的ssh網址無效。使用此命令設置遠程URL。

git remote set-url origin <new_url>