[英]Git clone/push/pull of a remote share fails
我們中的一些人在網絡共享(u:\\data\\some_repo.git)上使用裸存儲庫,這在預期的限制下工作正常
但是,就在最近,我無法執行與裸存儲庫相關的任何典型 git 活動:push pull clone。
所有活動都失敗了:
致命:'u:\\data\\some_repo.git' 似乎不是 git 存儲庫致命:無法從遠程存儲庫讀取。
請確保您擁有正確的訪問權限並且存儲庫存在。
我有訪問權限,我可以很好地瀏覽這個位置。 如果我將 some_repo.git 復制到我的本地機器並執行 git clone /c/Temp/some_repo.git 它工作。
沒有延遲問題,我有完全訪問權限,我試過在前面加上 file:/// 沒有運氣。 GIT_TRACE 不顯示任何內容
GIT_TRACE=1 git clone "/u/data/some_repo.git" 12:52:37.433340 exec-cmd.c:237 跟蹤:解析的可執行目錄:C:/STORAGE/Application/Git/mingw64/bin 12:52:37.435332 git.c:444
跟蹤:內置:git clone u:/data/some_repo.git Cloning into 'InternalTestInterface'... 12:52:38.129124 run-command.c:663
跟蹤:運行命令:取消設置 GIT_DIR; 'git-upload-pack'''u:/data/some_repo.git'''' 12:52:38.370091 exec-cmd.c:237
跟蹤:解析的可執行目錄:C:/STORAGE/Application/Git/mingw64/libexec/git-core 12:52:38.370091 git.c:444 跟蹤:內置:git upload-pack u:/data/some_repo.git致命:'Hu:/data/some_repo.git' 似乎不是 git 存儲庫致命:無法從遠程存儲庫讀取。請確保您擁有正確的訪問權限並且存儲庫存在。
知道如何解決這個問題
- 更新 -
根據要求,嘗試執行 git init:
/u/data/test.git
$ git init error: fstat on
//FQDN.com/site_###/Groups/data/test.git/.git/config failed: Invalid
argument fatal: could not set 'core.filemode' to 'false'
我在工作時使用完全相同的設置,使用相同的網絡驅動器(也命名為U:\\
!)
而且我在某些時候遇到了同樣的問題,顯然是由於一些后台同步/備份過程,它保持對 Git 裸存儲庫的某些文件的處理。
首先嘗試看看是否可以重新創建一個單獨的裸倉庫,用於測試,然后推送給它:
git init U:\data\test.git
cd path\to\local\repo
git remote add origin2 U:\data\test.git
git push origin2 master
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.