[英]“(.hg not found)” when cloning from cygwin-hosted repository via ssh to Mac and FreeBSD clients
我在Windows服務器上運行存檔文件系統,該服務器執行自動異地復制,這使其成為托管Mercurial存儲庫並確保其安全性的理想位置。 這個文件系統只有Windows,所以我別無選擇,只能使用Windows作為主機操作系統。
建立:
服務器('ungoliant',我的網絡內部):
客戶:
客戶端問題(Mac和FreeBSD上相同):
$ hg clone ssh://cjp@ungoliant//cygdrive/j/mercurial/rcstudio
running ssh cjp@ungoliant 'hg -R /cygdrive/j/mercurial/rcstudio serve --stdio'
remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!
我已經確認路徑和URI是正確的。 那里絕對有一個“.hg”目錄:
$ ls -la
total 0
drwxr-xr-x 3 cjp staff 102 Jun 5 17:41 .
drwxr-xr-x 41 cjp staff 1394 Jun 5 16:30 ..
$ scp -r cjp@ungoliant:/cygdrive/j/mercurial/rcstudio/.hg .
$ ls -la
total 0
drwxr-xr-x 3 cjp staff 102 Jun 5 17:41 .
drwxr-xr-x 41 cjp staff 1394 Jun 5 16:30 ..
drwxr-xr-x 5 cjp staff 170 Jun 5 17:41 .hg
$ ls -la .hg
total 16
drwxr-xr-x 5 cjp staff 170 Jun 5 17:41 .
drwxr-xr-x 3 cjp staff 102 Jun 5 17:41 ..
-rw-r--r-- 1 cjp staff 57 Jun 5 17:41 00changelog.i
-rw-r--r-- 1 cjp staff 33 Jun 5 17:41 requires
drwxr-xr-x 2 cjp staff 68 Jun 5 17:41 store
我發現了很多stackoverflow問題,其中問題是格式不正確的ssh URI ...我的格式正確並描述了絕對路徑。
我已經確認了以下所有內容:
我在這里難過。 Mercurial文檔聽起來像2.1.2應該能夠從1.9.3父級克隆,因此它似乎不是版本沖突。
非常感謝你的幫助! 謝謝!
我最終得到的是一種解決方法而不是答案。
我對遠程ssh命令處理的無知導致了誤解。 如果我要ssh到機器,“哪個hg”導致cygwin感知二進制文件“/ usr / bin / hg”,但是如果我做了一個遠程命令“ssh cjp @ ungoliant'hg'”,它返回了路徑到Windows二進制文件我也安裝在那台機器上。
我玩我的.bashrc文件,無法獲得遠程命令執行來優先處理cygwin二進制文件。 PATH甚至沒有包含Windows PATH條目,所以我開始討論這個問題並最終決定停止與它斗爭。
我已經放棄了整個想法,因為我相信,即使我把它付諸實踐,它也將是一個微妙的kludge,而且根本不值得我花在它上面。 我現在將我的存儲庫托管在BSD盒子上,並且我在Windows機器上有一個cron,它每24小時從該存儲庫拉到存檔文件系統一次。 它很簡單,就像一個零問題的魅力。
我有同樣的問題,通過添加像這樣的選項--remotecmd來解決它
hg clone --remotecmd /usr/bin/hg ssh://me@mywindowspc//cygdrive/m/hgrepo
當您嘗試使用scp時,您將執行以下操作:
scp username@ipaddr:/cygdrive/d/test/foo.txt ./myDestFolder
不幸的是,hg不起作用。 而是嘗試:
hg clone ssh://username@ipaddr/D:/testRepo
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.