상세 컨텐츠

본문 제목

Gerrit와 gitweb과 연동

Development

by chbae 2023. 4. 20. 04:31

본문

728x90
반응형

Ubuntu에서 gerrit을 설치하고, gitweb을 설치해 연동하는 방법이다. 여기서는 gitweb을 위해, 따로 webserver을 설치하지 않고 gerrit의 설정을 그대로 사용하는 방법에 대해서 설명한다.

 

따로 설정하여 연동하는 방법은 좀 더 복잡하니, https://git-scm.com/book/ko/v2/Git-%EC%84%9C%EB%B2%84-GitWeb를 참고해 gitweb을 설치하고, gerrit과의 연동에서 gitweb uri을 추가해 주면 된다.

테스트 환경

Ubuntu 14.04 64bit

설치 방법

  1. gitweb 설치
    $ sudo apt-get install gitweb
    설치하면 /usr/lib/cgi-bin/gitweb.cgi 파일이 생긴 것을 볼 수 있다.
  2. gerrit과 연동, https://gerrit-documentation.googlecode.com/svn/Documentation/2.5.2/config-gitweb.html
    $ git config --file $site_path/etc/gerrit.config gitweb.cgi /usr/lib/cgi-bin/gitweb.cgi
  3. gerrit 재시작
    $ $site_path/bin/gerrit.sh restart

연동 후에는 Gerrit의 Project - List의 각 Project 제일 오른쪽의 Repository Browser에 (gitweb) 버튼이 보인다. 그리고 클릭하면 다음과 같은 gitweb 화면이 나온다.

 

728x90

관련글 더보기