상세 컨텐츠

본문 제목

gerrit 의 git 폴더 옮길때 gerrit cache 삭제하는 방법

IT : Ubuntu

by 휀스 2017. 3. 3. 11:17

본문


Gerrit 서버를 설치하고 기존 GIT 폴더를 옮겨 올 경우 push 를 사용하는 방법보다 직접 git 폴더를 옮겨 오는 방법이 쉽습니다. 이때 gerrit server 의 cache 를 삭제해 주어야 gerrit 이 정상적으로 동작합니다.


ssh -p 29418 192.168.10.30 gerrit flush-caches --all


이 명령은 gerrit 의 cache 를 삭제하여 gerrit 이 db를 새로 생성하도록 만드는 명령입니다.



아래와 같은 방법으로 사용 가능합니다.


List caches available for flushing:


$ ssh -p 29418 review.example.com gerrit flush-caches --list

accounts

accounts_byemail

diff

groups

ldap_groups

openid

projects

sshkeys

web_sessions

Flush all caches known to the server, forcing them to recompute:


$ ssh -p 29418 review.example.com gerrit flush-caches --all

or


$ ssh -p 29418 review.example.com gerrit flush-caches

Flush only the "sshkeys" cache, after manually editing an SSH key for a user:


$ ssh -p 29418 review.example.com gerrit flush-caches --cache sshkeys

Flush "web_sessions", forcing all users to sign-in again:


$ ssh -p 29418 review.example.com gerrit flush-caches --cache web_sessions


Permission denied (publickey). 와 같은 error 가 발생할 경우 ip 나 주소 앞에 등록된 public key 를 가지고 있는 계정이름을 넣어주거나


ssh -p 29418 user123@review.example.com gerrit flush-caches --list


현재 계정의 ssh key를 추가로 등록해 줍니다.


이상 gerrit cache 삭제하는 방법에 대한 글 이였습니다.




관련글 더보기