仍在學習git並嘗試將其用於日常工作,在這方面,我在沒有備份的Linux羣集上存在一個存儲庫(這適用於ssh協議),我希望將其移動到另一臺有夜間備份的服務器上,但是,我到目前爲止還沒有成功(而且這個服務器使用https協議)。將存儲庫移動到另一臺服務器
我所做的是與
git remote add <name> https://server.info/directory.info
添加新的遠程位置,我研究了我的新遙控器是否有與
git remote -v
然後我試圖創建的一個空混帳回購協議服務器,我用sshfs掛載,但是我得到了下面的消息git init
error: could not commit config file
/home/utabak/webDataTU/staff-homes/t/utabak/vibroSys/.git/config
error: could not commit config file
/home/utabak/webDataTU/staff-homes/t/utabak/vibroSys/.git/config
error: could not commit config file
/home/utabak/webDataTU/staff-homes/t/utabak/vibroSys/.git/config
error: could not commit config file
/home/utabak/webDataTU/staff-homes/t/utabak/vibroSys/.git/config
error: could not commit config file
/home/utabak/webDataTU/staff-homes/t/utabak/vibroSys/.git/config
Initialized empty Git repository in
/home/utabak/webDataTU/staff-homes/t/utabak/vibroSys/.git/
然後我試圖把我從原來的回購拉與
git push webDataTU master
本地倉庫,並得到
fatal: https://path.info/info/refs not found: did you run git
update-server-info on the server?
隨後,我沒有在服務器端
git update-server-info
而且試用
git push webDataTU master
又得到了同樣的錯誤。
我的錯誤在哪裏?
它看起來像倉庫是不正確的'git的init'階段創建。你可以嘗試直接在服務器上重新初始化它,而不是通過SSHFS? – Chris
好吧,我該怎麼做,更具體地說,有沒有辦法用ssh或https做到這一點? –
SSH到服務器,'cd'到你要存放你的倉庫的目錄,然後'git init --bare repo-name.git'。 – Chris