的OP skipper3kreports一個與RUNTIME_PREFIX
發行Git,有點類似於「git pull
broken」的問題:
I'm not sure whether RUNTIME_PREFIX
is defined for you. But while nosing in the Makefile
, I did notice that prefix defaults to $(HOME)
. I suspect that this may be the cause of your problems.
The simple answer is to put this in ~/.bashrc
:
export GIT_EXEC_PATH=/opt/local/libexec/git-core
If you want to find out more about what's going on, you'll probably have to recompile git using port -d upgrade -f git-core
(or similar) and look closely at the build log to see where prefix is being set.
Incidentally, port cat git-core
shows heavy usage of ${prefix}
.
原來的答覆:
首先,你得到最先進的最新版本gitolite?
在https://github.com/sitaramc/gitolite/,您需要考慮 'pu
' 分支。
的installation documentation is then this one。
GitoliteV3 or 'g3' DOC:
"Installation" consists of the following options:
- Keep the sources anywhere and use the full path to run the gitolite command.
- Keep the sources anywhere and symlink just the gitolite program to some directory on your $PATH.
- Copy the sources somewhere and use that path to run the gitolite command.
You can run the 'install' command in 3 different ways:
# option 1
gitolite/install
# option 2
gitolite/install -ln
# defaults to $HOME/bin, or use a specific directory:
gitolite/install -ln /usr/local/bin
# option 3
gitolite/install -to /usr/local/gitolite/bin
老答案gitolite V2: 其次,我更喜歡 「from-client method」方法:
The advantage of this method is that it forces you to solve the ssh pubkey problem before attempting to install.
It works best if you have dedicated userids,
- one on the server for installing gitolite,
- and one on the client for administering it.
The disadvantage is that the admin user ends up with two keys
- one for shell access (that he started with) and
- one for gitolite access (which the script creates if needed).
所以我喜歡營造一種~/.ssh/config
文件用兩組不同的參數:
host gitolite
user git
hostname server
identityfile ~/.ssh/git
host gitadmin
user git
hostname server
identityfile ~/.ssh/id_rsa (myaccount public key)
的gitolite管理員僅適用於首次公開SSH密鑰可見:
C:\HOMEWARE\git>ssh gitolite
hello git, the gitolite version here is v1.5.9-25-ga10287a
the gitolite config gives you the following access:
R W gitolite-admin
@R_ @W_ testing
Connection to server closed.
用我的賬戶:
C:\HOMEWARE\git>ssh gitadmin
hello myaccount, the gitolite version here is v1.5.9-25-ga10287a
the gitolite config gives you the following access:
@R_ @W_ testing
Connection to mccprdgit10 closed.
所以:
C:\HOMEWARE\git>git clone gitolite:gitolite-admin
Cloning into gitolite-admin...
remote: Counting objects: 16, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 16 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (16/16), done.
Resolving deltas: 100% (2/2), done.
什麼是您使用的git克隆命令? – VonC 2011-02-18 12:34:13
git clone git @ server:gitolite-admin – skipper3k 2011-02-18 12:39:26
我想嘗試像這樣的克隆:「git clone ssh:// git @ server/gitolie-admin」,但不知道這是否是問題的原因。 – 2011-02-18 12:45:26