ããç¸æ¯gitosisï¼gitoliteçåè½æ´ä¸ºå¼ºå¤§ï¼æ¯æ对æéçç»åæ§å¶ï¼å¦ä¹ ä¸ä¸å¨ææ°ç çubuntu 14.04 LTSä¸æ建gitoliteæå¡å¨æ¯é常æå¿
è¦çï¼å¿å¿ï¼ä¸ä¼å±äºæ们èªå·±çGitHubå°±è¦åºæ¥äºï¼
ããå·¥å
·/åæ
ããUbuntu 14.04 LTS
ããgitolite
ããæ¹æ³/æ¥éª¤
ããé¦å
è¿éæ们å®è£
openssh-server openssh-clientï¼å¦æä½ ç¨çæ¯VPSä¹ç±»çä¸è¬é½é»è®¤å®è£
好äºï¼ä¸è¿è¿è¡ä¸ä¸ªè¿ä¸ªå½ä»¤ä¸ä¼æéçï¼å¦ææå®è£
å°±ä¼æ示已å®è£
ã
ããsudo apt-get -y install openssh-server openssh-client
ããå®è£
gitï¼å¨è¿ä¸ªæ ¸å¿è½¯ä»¶ï¼ä¸å¯æ缺ã
ããsudo apt-get -y install git
ããæ·»å gitoliteç¨æ·åååç¨æ·ç»ï¼å ä¸--systemåæ°ï¼ç¨æ·å°±ä¸ä¼å¨ç»éçé¢æ¾ç¤ºã
ããsudo adduser --system --shell /bin/sh --group --disabled-password --home /home/gitolite gitolite
ããçæssh keyï¼ä¸è·¯å车ä¸æ¥ã
ããssh-keygen -t rsa
ããå°ä½ å½åç¨æ·çssh pub keyå¤å¶å°/tmpä¸å¤ç¨ï¼ç±äºæç¨çæ¯æ¡é¢çå¨åä¸å°æºå¨ä¸ã
ããcp ~/.ssh/id_rsa.pub /tmp/ubuntugege.pub
ããå¦æä½ æ¯sshè¿ç¨ç»éå°æå¡å¨ä¸å®è£
ï¼å°±è¦æä½ æ¬å°çkeyå¤å¶å°è¿ç¨çæºå¨ä¸
ããscp ~/.ssh/id_rsa.pub gitolite.server:/tmp/ubuntugege.pub
ããå®è£
gitoliteï¼å¨ubuntuä¸å·²ç»éæäºï¼ä¸ç¨èªå·±å»ä¸è½½ã
ããsudo apt-get -y install gitolite
ããåæ¢å°gitoliteç¨æ·ç¯å¢ä¸ï¼å 为æè¦ä»¥gitoliteç¨æ·èº«ä»½å»åå§åå®è£
ã
ããsudo su - gitolite
ããæ§è¡åå§åå®è£
gitoliteã
ããgl-setup /tmp/ubuntugege.pub
ããæ管çåºgitolite-adminå
éè¿æ¥å°±å¯ä»¥å¼å§gitoliteç¨æ·å代ç åºç管çäºï¼å¦æä¸è½å
éï¼é£ä¹å°±è¯´æåå§åçssh pub keyéäºï¼å¦å¾å°±æ¯æåäºã
ããgit clone ssh://gitolite@localhost/gitolite-admin.git
温馨提示:答案为网友推荐,仅供参考