일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 속초
- 윈도우 네트워크
- 군포설렁탕
- 리눅스
- 팝업 제거
- 양지곰탕
- 모듬수육
- 3대천왕 돈까스
- 에버그린돈까스
- php70
- 백년가게
- gitlab
- 양지설렁탕
- 무료 ssl
- centos
- 동남집
- Table
- certbot
- Database
- ssl 자동갱신
- mysql
- Microsoft Teams 제거
- 시작프로그램 변경
- IP충돌
- 인덕원돈까스
- 군포식당
- 셀프 풍천 장어구이
- let’s go encrypt
- 안양 관양동
- mariaDB
- Today
- Total
써리원의 이것저것
PC 디렉토리에 GIT 백업데이터 연동 방법 (SourceTree) 본문
1. GitLab 에서 new project 생성
-> Project path http://192.168.xxx.xxx:8081/userid/
-> Visibility Level Internal
2. GitLab 에서 adding README 링크 클릭하여 테스트파일 생성
3. 로컬PC 에서 Git 서버와 연결할 폴더를 생성
-> D:\server_git\projectName
4. SourceTree 에서 저장소 복제/추가/생성
-> GitLab 에서 생성한 프로젝트의 https값을 설정
: 소스경로 / URL : http://192.168.xxx.xxx:8081/userid/projectName.git
: 목적지경로 : D:\server_git\projectName
5. GitLab 에서 readme 파일 삭제, SourceTree 에서 풀 테스트, 로컬 폴더에 파일 삭제 확인
6. 로컬 폴더에 Git 서버로 보낼 파일 복사
7. SourceTree 에서 커밋 > 푸시
8. 별도 서버의 공간에 서비스(또는 백업) 용도의 폴더를 생성
-> mkdir /home/projectName
9. /home/ 디렉토리에서 git clone git@192.168.xxx.xxx:userid/projectName.git
10. vi /home/projectName/pull_projectName.sh (chmod 755 pull_projectName.sh)
-> cd /home/projectName/
-> git pull origin
11. Git 서버의 hook 디렉토리에 post-update (chmod 755) 생성 또는 수정
-> cd /var/opt/gitlab/git-data/repositories/shwon/projectName.git/hooks
-> vi post-update
-> ssh root@192.168.xxx.xxx "/home/projectName/pull_projectName.sh"
12. 로컬PC 에서 test.html 파일 생성, 커밋, 푸시 -> 서버의 /home/projectName/test.html 파일 생성 확인
'서버관련' 카테고리의 다른 글
Sendmail Queue 확인 (0) | 2018.07.10 |
---|---|
HeidiSQL mysql 외부연결 (0) | 2018.06.22 |
centos + mariadb + GitLab + redmine + php70 설치 (0) | 2018.06.22 |
AWS 리눅스 설치 (0) | 2018.06.22 |
리눅스 계정 생성 (0) | 2018.06.22 |