2014-06-26 143 views
2

我設置了一個Debian服務器,它使用SSH訪問shell和git repos。我創建了它的裸回購和使用ssh能夠試圖推動修改到Debian的服務器我習慣這裏所描述的錯誤時,將其克隆到我的Windows 8工作站,但是:Git推不工作,但「git克隆」和SSH做

enter image description here

Read from remote host 174.52.5.192: Connection reset by peer 
fatal: sha1 file '<stdout>' write error: invalid argument 
fatal: The remote end hung up unexpectedly 
error: failed to push some refs to '[email protected]:/home/git/repos/space-junk.git/' 

我經常使用這個工作站來通過SSH訪問同一臺服務器,所以我知道無法訪問SSH不是問題。

有沒有人有任何想法發生了什麼問題?

+1

是否一致? http://stackoverflow.com/a/20315896/6309 – VonC

+0

是的不幸 –

回答

3

實際上,第一推應該是:

git push -u origin master 

將在當地分公司主鏈接到它的遠程跟蹤一個原點/主

然後,先推後,您將能夠(爲所有後續推)做一個簡單的:

git push 

查看更多在「Why do I need to explicitly push a new branch?」。

1

我明白了!事實證明,正確的命令是

git push origin master 

的Windows版本不具有足夠的描述錯誤消息,但我得到了它通過切換到Linux,它告訴我,我的命令是錯誤的工作。