2011-07-21 41 views
4

我在一個開源項目上工作。我們將生產配置文件保存在一個單獨的git存儲庫中,僅供我們團隊的少數成員使用。這個回購是我們大型項目的子模塊,它允許人們在沒有看到我們的產品信譽的情況下抓取和編譯項目。任何方式克服git子模塊?

問題是,哈德森試圖拉下子模塊和哈德森用戶沒有該回購拉的權限。

hudson.plugins.git.GitException: Error performing command: git submodule update 
Command "git submodule update" returned status code 1: Initialized empty Git repository in <http://athenadev.fracturedatlas.org:5904/job/ATHENA/ws/assembly/.git/> 
ERROR: Permission to fracturedatlas/assembly.git denied to fracturedatlas/artful.ly. 
fatal: The remote end hung up unexpectedly 
Clone of '[email protected]:fracturedatlas/assembly.git' into submodule path 'assembly' failed 

     at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:691) 

有沒有解決這個一個好的「混帳」的方式,還是我們將需要重新思考我們的戰略保持生產憑據遠離壞人?

回答

1

如果這個祕密回購是一個更大回購的子模塊,然後...哈德森應該試圖從更大的回購拉;)

應該從「另一個更大的回購協議」,這是拉與第一個相同,,但表示該子模塊的存在。

這是很容易做到的時候:

  • 母公司回購是空的,只有聲明子模塊(一個用於「大項目」,一爲「祕密回購」)
  • 的「大項目「包括一個符號鏈接到祕密回購(這樣,你不必在大型項目中直接聲明祕密回購子模塊,你可以在準空父代回購中聲明)

當這樣的父回購存在(僅限於兩個子模塊的內容),這是eas y複製這樣一個父回購,以獲得一個只包含一個子模塊(「更大的項目」),沒有其他(「祕密回購」)。
而這將是第二個父母回購哈德森將能夠拉。