我對git和ubuntu非常陌生。我今天安裝了我的ubuntu服務器,現在我正嘗試爲我和一些開始項目的朋友設置一個git存儲庫。但是,無論我做什麼我不斷收到同樣的錯誤:GIT致命:無法從Rempote存儲庫中讀取
fatal: '/git.git' does not appear to be a git repository
fatal: could not read from rempote repository
please make sure you have the correct access rights and the repository exists.
我幾乎可以100%肯定的路徑是正確的,我嘗試了我百萬個不同的pathcombinations並沒有什麼作品。在推送之前,我是否需要在Ubuntu上設置任何特殊許可?或者我錯過了其他任何內容?
這是我要做的事
在Ubuntu服務器在/ var/WWW:通過混帳猛砸
sudo mkdir git.git
cd git.git/
git --bare init
在Windows上,從桌面:
mkdir git.git
cd git.git/
git init
然後添加一些文本文件。
git . add
git commit -m "Initial Upload"
git remote add origin [email protected]'server-ip':/git.git
git push origin master
得到要求輸入密碼,然後發生錯誤。
當你從本地git倉庫推送時,你不一定要指定遠程服務器(我懷疑這是你在做什麼)。你的命令行是什麼? – xbug 2014-11-20 23:17:11
不確定你的意思與本地git回購?我已經在一臺計算機上安裝了Ubuntu服務器,同時嘗試從另一臺計算機推送到Ubuntu。我現在使用的是git bash – Cevil 2014-11-20 23:24:18
如果你編輯了你的文章並添加了所有最終導致錯誤的命令,這將有所幫助。 – xbug 2014-11-20 23:33:01