본문 바로가기
Spring/AWS

[AWS / Mac M1] Ubuntu(EC2)에서 Private 레포 Git Clone 받기 / EC2에 빌드

by 지쳐있는 엘모 2023. 2. 26.

사이드 프로젝트를 시작하면서 Private Repository는 처음 클론 받아보는데..

오늘도 열심히 삽질을 하다 겨우 해결했다.

기록해두시는 블로거님들 정말 존경합니다.

 

우선 해야할 것
1. EC2 SSH 키 발급
2. 내 Github 계정에 등록
fatal: could not create work tree dir 'package-name': Permission denied

 

응 오류발생 ( 해결은 아래 사이트 참고 )

https://stackoverflow.com/questions/16376035/fatal-could-not-create-work-tree-dir-kivy

 

fatal: could not create work tree dir 'kivy'

I'm trying to clone my fork of the kivy git, but it's not working. I've made the fork correctly, I believe, but when I type this into my Mac terminal: git clone https://github.com/mygitusername/...

stackoverflow.com

어찌저찌 깃 클론은 받았는데 이제는 EC2 인스턴스에서 빌드가 안된다 하..

java.lang.NoClassDefFoundError: org/gradle/wrapper/GradleWrapperMain

 

찾아보니 깃허브에 푸쉬할 때 gradle-wrapper.jar 를 .gitignore에 추가한 것 같고

그로 인해 gradle-wrapper.jar 실행파일을 찾을 수 없다는 문제

 

해결방법 : EC2에서 Gradle 설치

 

그런데!!! 혹시 Spring 2.7.x 이상 쓰는 사람은 Gradle 6.8.x 이상 설치해야한다

제발!!! 나도 알고싶지 않았다..(고난의 연속)

 

Spring Boot plugin requires Gradle 6.8.x, 6.9.x, or 7.x.
The current version is Gradle 4.4.1 Spring Boot plugin requires Gradle 6.8.x, 6.9.x, or 7.x.
The current version is Gradle 4.4.1

 

Gradle 버전 업그레이드 하려고 또 삽질을 했고

찾았다 나의 고통해결사..

 

https://velog.io/@k0000k/%EB%A6%AC%EB%88%85%EC%8A%A4%EC%97%90%EC%84%9C-Gradle-%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0

 

[Linux/Ubuntu] 리눅스 Gradle 최신 버전 설치, 버전 변경하기

개발중인 Springboot 프로젝트의 개발용 서버가 필요해서 GCP(Google Cloud Platform)에 올리고 CI/CD 구축까지 시도 할 계획을 세웠다. 이 과정에서 여러 문제를 트러블슈팅 하게 되었는데, 그 중에서 해결

velog.io

 

gradle 정상 설치 후 아래 명령어를 입력하면 gradle-wrapper.jar 가 생성된다

$ gradle wrap

 

댓글