====== GitLab ====== * description : Gitlab 사용법 기술 * author : 주레피 * email : dhan@repia.com * lastupdate : 2020-07-30 ===== 주요 명령어 ===== gitlab 설정 파일 cd /opt/gitlab/bin $> sudo -s vi /etc/gitlab/gitlab.rb \\ gitlab 시작 및 종료 cd /opt/gitlab/bin $> sudo -s gitlab-ctl start $> sudo -s gitlab-ctl stop [[https://ipex.tistory.com/entry/gitlab-%EA%B8%B0%EB%B3%B8-%EC%84%A4%EC%A0%95|gitlab 기본 설정]] \\ \\ gitlab 재 설정 후 재 시작 cd /opt/gitlab/bin $> sudo -s gitlab-ctl reconfigure \\ gitlab 로그 확인 cd /opt/gitlab/bin $> sudo -s vi /var/log/gitlab/gitlab-rails/production.log ===== ssh key 생성 ===== Windows Git Bash 실행 $ ssh-keygen dhan-yoga@REPIA-DHAN MINGW64 ~ $ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/user/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/user/.ssh/id_rsa. Your public key has been saved in /c/Users/user/.ssh/id_rsa.pub. The key fingerprint is: SHA256:V39LcB5Fo085B6lO3LapBWMv+1FMkI5q9bpBx5py8VE user@DESKTOP The key's randomart image is: +---[RSA 2048]----+ | o=o| | +o+| | ..B *E| | .XoX++| | S .*o*=*+| | .o.o*B+.| | .. =*o. | | o+. . | | .o. | +----[SHA256]-----+ ssh-rsa AAAAB3..............................................사용자@컴퓨터이름 Message: https://gitlab.com/lukmin77/keis_monitoring_web_2020.git: Secure connection to https://gitlab.com/lukmin77/keis_monitoring_web_2020.git could not be stablished because of SSL problems Exception Stack Trace: org.eclipse.jgit.api.errors.TransportException: https://gitlab.com/lukmin77/keis_monitoring_web_2020.git: Secure connection to https://gitlab.com/lukmin77/keis_monitoring_web_2020.git could not be stablished because of SSL problems at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:250) at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:293) at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:200) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267) at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:232) at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:176) at org.eclipse.egit.ui.internal.pull.PullOperationUI.access$0(PullOperationUI.java:168) at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.runInWorkspace(PullOperationUI.java:141) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) Caused by: org.eclipse.jgit.errors.TransportException: https://gitlab.com/lukmin77/keis_monitoring_web_2020.git: Secure connection to https://gitlab.com/lukmin77/keis_monitoring_web_2020.git could not be stablished because of SSL problems at org.eclipse.jgit.transport.TransportHttp.handleSslFailure(TransportHttp.java:619) at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:569) at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:341) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:137) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:123) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1236) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:239) ... 10 more Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1991) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1104) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1343) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1511) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:99) at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:202) at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:500) ... 15 more Session Data: eclipse.buildId=4.7.3.M20180330-0640 java.version=1.8.0_20 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=ko_KR Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product keis_monitoring_web_2020 org.eclipse.wst.common.project.facet.core.builder org.eclipse.jdt.core.javabuilder org.eclipse.m2e.core.maven2Builder org.springframework.ide.eclipse.core.springbuilder org.springframework.ide.eclipse.boot.validation.springbootbuilder org.springframework.ide.eclipse.core.springnature org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature org.eclipse.wst.common.project.facet.core.nature ===== 백업 ===== * [[https://yscho03.tistory.com/129|GitLab 백업]] ===== 설치 ===== [[https://hreeman.tistory.com/m/78?category=597879|CentOS 7 에서 GitLab 설치하기]] \\ ===== Tip ===== * 프로젝트 이벤트 알람 보내기 - ${프로젝트명} > Settings > Integrations > Emails on push 이동 - 옵션을 체크한 이후 마지막에 메일 주소를 입력하고 저장하면 됩니다. {{:wiki:3party:scm:git:gitlab:gitlab_email.png?400|프로젝트 이벤트 알람 보내기}} ===== Troubleshooting ===== [[https://linux.systemv.pe.kr/gitlab-%ED%8C%A8%EC%8A%A4%EC%9B%8C%EB%93%9C-%EB%A6%AC%EC%85%8B%ED%95%98%EA%B8%B0/|깃랩 웹('root') 패스워드 리셋하기]]\\ [[https://snepbnt.tistory.com/280 | 깃랩 pull 에러 날 경우 1]]\\ [[https://song8420.tistory.com/138 | 깃랩 pull 에러 날 경우 2]]\\ {{tag>주레피 gitlab}}