목차

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

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

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>keis_monitoring_web_2020</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.wst.common.project.facet.core.builder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.m2e.core.maven2Builder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.springframework.ide.eclipse.core.springbuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.springframework.ide.eclipse.core.springnature</nature>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.m2e.core.maven2Nature</nature>
		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
	</natures>
</projectDescription>

백업

설치

CentOS 7 에서 GitLab 설치하기

Tip

프로젝트 이벤트 알람 보내기

Troubleshooting

깃랩 웹('root') 패스워드 리셋하기
깃랩 pull 에러 날 경우 1
깃랩 pull 에러 날 경우 2